Rev 17065 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | #if you change these limits, you have to modify var.def! |
2 | limit_var=2048 |
||
3 | maxstep=100 |
||
4 | |||
5 | wims_multiexec=pari maxima |
||
6 | insmath_rawmath=yes |
||
7 | wims_backslash_insmath=yes |
||
8 | htmlmath_gtlt=yes |
||
9 | proc_oef=yes |
||
17046 | bpr | 10 | !set oefenv_lang=$lang |
17065 | bpr | 11 | !readproc deduc/names |
17046 | bpr | 12 | |
20 | reyssat | 13 | !read deduc/var.headers |
14 | # Limit Pari precision, for otherwise many computations will fail. |
||
15 | !default pari_precision=18 |
||
16 | !default precision=10000 |
||
17 | !default print_precision=8 |
||
18 | wims_print_precision=$print_precision |
||
19 | maxima_precision=$print_precision |
||
20 | !default insplot_set=size 0.6,0.6 |
||
21 | |||
22 | !if $cmd=help |
||
16113 | bpr | 23 | !set module_title=$title |
24 | !set module_author=$author |
||
25 | !set module_address=$email |
||
26 | !exit |
||
20 | reyssat | 27 | !endif |
28 | |||
29 | !read Exindex |
||
30 | exocnt=!itemcnt $exolist |
||
31 | !bound qnum between integer 1 and $exocnt default 1 |
||
32 | !bound qcmlevel between integer 1 and 9 default 3 |
||
33 | !bound random within 0,1 default 1 |
||
34 | !default format=html |
||
35 | |||
36 | !if $cmd notwordof new renew and $status!=waiting |
||
16113 | bpr | 37 | !readproc oef/valback.proc |
38 | error=double_reply |
||
39 | !exit |
||
20 | reyssat | 40 | !endif |
41 | |||
42 | !readproc deduc/imagedir.proc |
||
43 | !distribute items 0,0,0 into postvarcnt,conditioncnt,feedbackcnt |
||
44 | |||
45 | !if $status!=waiting |
||
16113 | bpr | 46 | !read deduc/exo.init |
20 | reyssat | 47 | !else |
16113 | bpr | 48 | !read $deffile |
49 | !readproc oef/valback.proc |
||
20 | reyssat | 50 | !endif |
51 | |||
52 | m_step=$currstep |
||
53 | !if $cmd=reply and $status=waiting |
||
54 | !if $opt iswordof newstep newcase gotocase |
||
16113 | bpr | 55 | !changeto deduc/var.$opt |
20 | reyssat | 56 | !endif |
57 | !readproc deduc/meth$methstep.proc |
||
58 | !if $error!=$empty or $methsubstep>1 |
||
16113 | bpr | 59 | !exit |
20 | reyssat | 60 | !endif |
61 | !advance methstep |
||
62 | !if $methstep<=3 and \ |
||
63 | ($methstep<=2 or \ |
||
64 | (($askcontext>0 and $contextlist!=$empty) or \ |
||
65 | ($askresult>0 and $resultlist!=$empty))) |
||
66 | !exit |
||
67 | !endif |
||
68 | methstep=1 |
||
69 | thisstepnocount=$stepnocounting |
||
70 | !read deduc/methreset |
||
71 | !if $postvarcnt>0 |
||
16113 | bpr | 72 | !read $deffile postdef |
20 | reyssat | 73 | !endif |
74 | ctstep=!char 1 to $currstep of $stepcounting |
||
75 | ctstep=!text select 1 in $ctstep |
||
76 | ctstep=!charcnt $ctstep |
||
77 | !if $earlyscore=$empty |
||
16113 | bpr | 78 | cstep=$[max($m_minsteps,$ctstep-$tolerance)] |
79 | vstep=$[min($ctstep,$cstep)] |
||
80 | uustep=$[max(0,$ustep-$ctstep-max(0,$m_minsteps+$tolerance-$ctstep))] |
||
81 | wstep=$[max(1,$vstep)+$ecoeff*$uustep+$pcoeff*$penalty] |
||
82 | wscore=$[max(0,(($m_minsteps/$wstep)^$scorepower-$scoremin)/(1-$scoremin))] |
||
83 | scoretest=$[min(10,rint(100*$wscore)/10)] |
||
84 | !if $scoretest<=0 |
||
85 | earlyscore=0 |
||
86 | module_score=0 |
||
87 | wims_module_log=score $module_score/10 |
||
88 | !endif |
||
89 | !else |
||
90 | scoretest=$earlyscore |
||
20 | reyssat | 91 | !endif |
16113 | bpr | 92 | !if $thisstepnocount!=yes |
93 | !advance ustep |
||
94 | !endif |
||
95 | !advance currstep |
||
96 | m_step=$currstep |
||
97 | !if $currstep>$cutstep |
||
98 | scoretest=0 |
||
99 | cutstop=yes |
||
100 | !changeto deduc/var.finish |
||
101 | !endif |
||
20 | reyssat | 102 | |
16113 | bpr | 103 | !if $conditioncnt>0 |
104 | !read $deffile test |
||
105 | !else |
||
106 | !read deduc/var.checkgoal |
||
107 | !endif |
||
108 | !if $condtest1=1 or $condtest1=-1 |
||
109 | !read deduc/var.finish |
||
110 | !endif |
||
20 | reyssat | 111 | !endif |