Subversion Repositories wimsdev

Rev

Rev 7363 | Rev 7664 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7363 Rev 7612
Line -... Line 1...
-
 
1
# Variables x_ y_ z_ are defined before
-
 
2
# Variables used: defaultformula in adm/class/userlist/var.proc
-
 
3
# defaultformula=!line 2 to -1 of (record 0) of wimshome/log/classes/$wims_class/sheets/.severity
-
 
4
 
1
# Output variables:
5
# Output variables:
2
#
6
#
3
# f_$i: formula of sheet $i.
7
# f_$i: formula of sheet $i.
4
# w_$i: weight of sheet $i.
8
# w_$i: weight of sheet $i.
5
# s_$i: severity of $sheet $i.
9
# s_$i: severity of $sheet $i.
6
# totweight: total sum of weights.
10
# totweight: total sum of weights.
7
# this formula must be calculated on some variables x_ and y_
11
# this formula must be calculated on some variables x_ and y_ or z_
8
 
12
 
9
totweight=0
13
totweight=0
10
totsheets=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets
14
totsheets=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets
11
totexams=!recordcnt wimshome/log/classes/$wims_class/exams/.exams
15
totexams=!recordcnt wimshome/log/classes/$wims_class/exams/.exams
12
examweights=!record 0 of wimshome/log/classes/$wims_class/exams/.eseverity
16
examweights=!record 0 of wimshome/log/classes/$wims_class/exams/.eseverity
13
!for i=1 to $totsheets
17
!for i=1 to $totsheets
14
 f_=!line $i of $defaultformula
18
 f_=!line $i of $defaultformula
15
 !distribute word $f_ into w_$i,s
19
 !distribute word $f_ into w_$i,s
16
 !default w_$i=1
20
 !default w_$i=1
17
 !bound s between integer 0 and 6 default 2
21
 !bound s between integer 0 and 13 default 2
18
 f_$i=!line $s+1 of max($$x_,$$y_)\
22
 f_$i=!line $s+1 of max($$x_,$$y_)\
19
$$x_\
23
$$x_\
20
$$x_*$$y_^0.3\
24
$$x_*$$y_^0.3\
21
$$x_*$$y_^0.5\
25
$$x_*$$y_^0.5\
22
$$x_*$$y_\
26
$$x_*$$y_\
23
$$x_^2*$$y_\
27
$$x_^2*$$y_\
24
($$x_*$$y_)^2
28
($$x_*$$y_)^2\
-
 
29
max($$z_,$$y_)\
-
 
30
$$z_\
-
 
31
$$z_*$$y_^0.3\
-
 
32
$$z_*$$y_^0.5\
-
 
33
$$z_*$$y_\
-
 
34
$$z_^2*$$y_\
-
 
35
($$z_*$$y_)^2
25
 !if $i isitemof $activesh
36
 !if $i isitemof $activesh
26
  totweight=$[$totweight+$(w_$i)]
37
  totweight=$[$totweight+$(w_$i)]
27
 !endif
38
 !endif
28
 s_$i=$s
39
 s_$i=$s
29
!next i
40
!next i