{VERSION 6 0 "IBM INTEL LINUX" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 1 12 0 0 255 1 0 2 0 0 1 0 0 0 0 1 }{CSTYLE "_cstyle112" -1 256 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle102" -1 257 "Courier" 1 12 0 0 255 1 2 2 2 2 1 2 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 16 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE " Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 6 6 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 4 4 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Cour ier" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 128 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 16 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Title" -1 259 1 {CSTYLE "" -1 -1 "Ti mes" 1 24 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 12 12 3 0 3 0 2 2 19 1 }{PSTYLE "Maple Output" -1 260 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Title" -1 261 1 {CSTYLE "" -1 -1 "Times" 1 36 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 12 12 3 0 3 0 2 2 19 1 }{PSTYLE "Normal" -1 262 1 {CSTYLE "" -1 -1 "Times" 1 18 255 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "_pstyle143" -1 263 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 4 4 2 0 2 0 2 2 -1 1 }{PSTYLE "_pst yle132" -1 264 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 255 1 2 2 2 2 1 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "_pstyle144" -1 265 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }1 1 0 0 4 4 2 0 2 0 2 2 -1 1 }{PSTYLE "_pstyle145" -1 266 1 {CSTYLE "" -1 -1 " Courier" 1 12 0 0 255 1 0 2 0 2 1 2 0 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "_pstyle146" -1 267 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 255 1 2 2 2 2 1 2 0 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "restart; with(pldx): with(simul):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "march(dele te,libname[1],\"simul.m\");" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 527 "restart: if kernelopts(platform)=\"unix\" \n then unix:= true; wi n98:= false; \n date_string:= convert(substring(ssystem(\"date \"\"+%a %d/%m/%Y\"\" \")[2], 1..-2), symbol)\n else unix:= false; win98:= eva lb(ssystem(\"win\")[2][1..13]=\"Vous utilisez\"); \n if win98 then tm p:= ssystem(\"date\")[2]; searchtext(\":\", tmp); \n tmp:= cat(subst ring(tmp, 1..%-2), \" \", substring(tmp, %+1..-1));\n date_strin g:= substring(tmp, 22..35);\n else date_string:= ssystem(\"date /t\") [2][1..-2];\n fi: fi: 'unix'=unix, 'win98'=win98, 'date'= date_string; " }}}{EXCHG {PARA 262 "" 0 "" {TEXT -1 56 "sous win98, taper [entr\351 e] pour sortir de la fenetre DOS" }}{PAGEBK }{PARA 262 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 261 "" 0 "" {TEXT -1 16 "Simul (v6789-23)" }}} {EXCHG {PARA 258 "" 0 "" {TEXT -1 64 "Copyright (c) 1999-2007 Pierre L . Douillet \n" }}{PARA 258 "" 0 "" {TEXT -1 11 "Li cence GPL" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 194 "libre reproduction pour un usage universitaire sous reserve d' une copie compl\350te,\navec reproduction du programme source dont, en particulier, la pr\351sente mention\n \naucune garantie de fiabilit \351. " }}{PARA 258 "" 0 "" {TEXT -1 89 "en particulier, toute utilisa tion dans un contexte industriel est vivement d\351conseill\351e\n " } }}{EXCHG {PARA 262 "" 0 "" {TEXT -1 38 "chargement par la commande wit h(simul)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 15 "Initialisations" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "gc( ); kernelopts(ASSERT=true):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 465 "[libname][-1]; racine:= %[1..-4]:\ndo lo c:= searchtext(\"\\\\\",racine); if loc = 0 then break fi;\nracine:= c at(substring(racine,1..loc-1),\"/\", substring(racine,loc+1..-1)); od: \ndo loc:= searchtext(\"\\\\\",racine); if loc = 0 then break fi;\nrac ine:= cat(substring(racine,1..loc-1),\"/\", substring(racine,loc+1..-1 )); od:\nloc:= SearchText(\"MAPLE\", racine): if loc <> 0 then\nracine := cat(substring(racine,1..loc-1),\"Maple\", substring(racine,loc+5..- 1)); fi: \n'racine'=racine; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "kernelopts(version): Version:= substring(%, 1..searchtext(\",\", %)-1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 77 "Test if \"pldx\" is pr eloaded, as required for this library to operate properly" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 206 "try read( cat(racine, \"update/check.m\")); \nprint(`The usual 'update' directory stil exists, as requiered`);\nca tch: print (` An 'update' repertory MUST be created, using 'pldx' pack age`);;\nend try; print(``);" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT 256 80 "Cr\351ation de la list e des procedures savelib'ed, routines xreadlib, xwith, xmarch" }{TEXT -1 0 "" }}{SECT 0 {PARA 265 "" 0 "" {TEXT -1 69 "mylib ... \352tre cer tain de ne pas encombrer la biblioth\350que principale" }}{EXCHG {PARA 264 "> " 0 "" {MPLTEXT 1 257 268 "if assigned(libname) then myli b := cat(op(1, eval([libname], 1)), \"/\");\n else error \"the global \+ variable `libname' must be assigned\"\nend if;\nunprotect(savelib); \n savelib:= proc () option builtin; 274 end proc: ## Maple 9.5\nsavelib: = proc() error \"savelib is gone\" end:" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 15 "gestion savelib" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 107 "ever_load:= NULL:\nssavelib:= NULL: ### la liste de ce qui a \+ \351t\351 sauv\351\nfakename:= cat(mylib, \"azorvelo.m\");" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 241 "dirname:= proc(qui) local dir, nam , ici; \ndir, nam:= ``, qui;\nto 4 while true do \n ici:= searchtext( \"/\", nam); \n if ici=0 then break fi;\n dir, nam:= cat(dir, substrin g(nam,1..ici-1), \"/\"), substring(nam, ici+1..-1);\nod; return dir, n am;\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1016 "xsavelib678: = proc() local filename, values, library, pathname, f;\nglobal ssaveli b, libname; option `Copyright Pld, 1996-2006`;\nif assigned(libname) t hen library := op(1, eval([libname], 1))\n else error \"the global var iable `libname' must be assigned\"\nend if;\nif nargs < 2 then error \+ \"no names specified to save\" end if;\nfilename := args[nargs];\nvalu es := args[1 .. nargs - 1] ;\nif not type(filename, '\{string, symbol \}') \n then error \"last argument (filename) must be a string\" end if;\nif not searchtext(\".m\", filename, -2 .. -1) = 1 \n then error \"last argument (filename) must be a *.m string\" end if;\n if not ty pe([values], 'list(symbol)') \n then f := remove(type, [values], 'sy mbol'); \n error \"all arguments must be symbols, cannot save these % 1\", f\n end if;\n pathname := cat(library, \"/\", filename);\n f := subs('T' = (values, pathname), proc() save T end proc);\n try f(); r eturn; \n catch:\n finally ssavelib:= ssavelib, values; \n end tr y;\nerror \"unable to save %1 in %2\", [values], library\nend proc:" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 890 "xsavelib9:= proc() local \+ filename, values, pathname, f, dir, nam;\nglobal ssavelib, mylib, fake name; option `Copyright Pld, 2007`;\nif nargs < 2 then error \"nargs=1 , expected=2\" end if;\nfilename := args[nargs];\nvalues := args[1 .. \+ nargs - 1] ;\nif not type(filename, '\{string, symbol\}') \n then er ror \"last argument (filename) must be a string\" end if;\nif not sear chtext(\".m\", filename, -2 .. -1) = 1 \n then error \"last argument \+ (filename) must be a *.m string\" end if;\nif not type([values], 'list (symbol)') \n then f := remove(type, [values], 'symbol'); \n error \+ \"all arguments must be symbols, cannot save these %1\", f\nend if;\ns savelib:= ssavelib, values;\ndir,nam:= dirname(filename); try mkdir(ca t(mylib, dir)); catch: end try;\nf := subs('T' = (values, cat(mylib, f ilename)), proc() save T end proc);\ntry f();\ncatch: \n error \"unab le to save %1 in %2\", [values], mylib\nend try;\nend proc:" }}} {EXCHG {PARA 266 "> " 0 "" {MPLTEXT 1 0 214 "if substring(Version,1. .7)=`Maple 9` then xsavelib:= eval(xsavelib9)\nelif member(substring( Version,1..7), \{`Maple 6`, `Maple 7`,`Maple 8` \}) then xsavelib:= ev al(xsavelib678) \nelse error \"undefined xsavelib\" fi;" }{MPLTEXT 1 -1 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 4 "init" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 431 "\"simul v6789 -23 ; author : ; last modif (v6789) : \"\n || (date_string):\n`simul/init`:= \n subs(message=%, proc() option `Cop yright Pierre L. Douillet`;\n global `stats/transform/functions/tally `, _seed;\n stats['transform', 'tally'](['red', 'blue', 'red']):\n ` stats/transform/functions/tally`:= eval(`simul/tally`):\n if not assi gned(_seed) then _seed:=1; fi; \n print(convert(message, symbol)) en d): %();" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 7 "Xmacros" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 202 "xmacro:= proc ();\nmacro(\n'moy'=stats['describe','m ean'],\n'var'=stats['describe','variance'],\n'cov'=stats['describe','c ovariance'],\n'xab'=stats['describe','range'],\n'nbr'=stats['describe' ,'count']);\nend:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "ever_load:= ev er_load, xmacro:" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {SECT 0 {PARA 3 "" 0 "" {TEXT -1 66 "Good generators are hard to find \+ : LGM (xlgm_ini, xlgm, xpie2proc)" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 4 "xlgm" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 132 "`xlgm_ini` := pr oc(seed::integer) option `Copyright LGM`; global lgm_s;\n if nargs \+ = 0 then lgm_s := 1 else lgm_s := seed fi\nend ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 124 "xlgm:= proc() option `Copyright LGM`;\n glo bal lgm_s; lgm_s := irem(lgm_s*16807, 2147483647); evalhf(lgm_s/214748 3647) end ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 96 "ra:= proc() \+ global _seed;\n_seed := irem(427419669081*_seed, 999999999989); Float( _seed,-12)\nend;" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 30 "xpie2proc : bien plus rapide !" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 433 "xpie 2proc:= proc(fun) option `Copyright Pierre L. Douillet`; local x, act ion; x := 'x': \naction:= proc(x, fu) local mg, cut ; \n if nops(fu) =2 then RETURN(convert(op(2,fu), string)) fi; \n cut:= 2*ceil(nops(fu )/4.) : mg:= fu[1..cut] ;\n \" if \", convert(mg[-2], string), \" the n \", procname(x, mg), \n \" else \", procname(x, fu[cut+1..-1]), \" \+ fi \" ; \nend :\naction(x,convert(fun(x), list)) ; cat(\"proc(x);\", % , \"end;\"); parse(%); end ;" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "ever_load:= ever_load, ra, xlgm_ini, xlgm, xpie2proc :" }}}} {SECT 0 {PARA 3 "" 0 "" {TEXT -1 13 "Interpolation" }}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 1521 "newraph:= proc(x, F, f, initpoint, leftbar rier) \nlocal F1, F2, f1, f2, x1, x2, x1e, x2e, olddigits, status_ok, \+ hasleftbarrier, correction;\noption `Copyright (c) revisited.`;\n if 4 < nargs then hasleftbarrier := true else hasleftbarrier := false end \+ if;\n olddigits := Digits;\n Digits := Digits + 5;\n if nargs < 4 then x1 := 0 else x1 := initpoint end if;\n status_ok := 'false';\n F1 := \+ evalf(F(x1) - x);\n f1 := evalf(f(x1));\n x1e := evalf(x1, olddigits); \n userinfo(4, stats, '`Newton-Raphson: x1,F1,f1`', x1, F1, f1);\n to \+ 100 do\n x2 := evalf(x1 - F1/f1);\n if hasleftbarrier and x2 < leftb arrier then\n correction := traperror(1.01^(x2 - leftbarrier));\n \+ if x1 - leftbarrier < 1 then correction := 1/100*correction*(x1 - left barrier) end if;\n x2 := leftbarrier + correction\n end if;\n if n ot type(x2, \{numeric, float\}) then error \"x2 is not numeric\" end i f;\n F2 := evalf(F(x2) - x);\n f2 := evalf(f(x2));\n x2e := evalf(x 2, olddigits);\n userinfo(4, stats, '`x2,F2,f2`', x2, F2, f2);\n if \+ x1e = 0 and x2e = 0 or evalf(abs(x2 - x1)/(abs(x1) + abs(x2))) < Float (1, -olddigits - 1) then\n status_ok := 'true'; break\n end if;\n \+ x1 := x2;\n x1e := x2e;\n F1 := F2;\n f1 := f2\n end do;\n if statu s_ok then userinfo(3, stats, '`Newton-Raphson, residual is`', F2)\n el se userinfo(2, stats, '`Newton-Raphson, broke out after 100 iterations , residual is`', F2, \n '` x1-x2 is `', x1 - x2)\n end if;\n Digits \+ := olddigits;\n userinfo(4, stats, 'F2 - F1, f2 - f1, x2 - x1', F2 - F 1, f2 - f1, x2 - x1);\n RETURN(evalf(x2))\nend proc;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "ever_load:= ever_load, newraph;" }}}} {SECT 0 {PARA 3 "" 0 "" {TEXT -1 13 "lois usuelles" }}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 74 "unprotect('gauss', 'norlaw', 'Norlaw', 'INor law', 'chi2', 'Chi2', 'IChi');" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 299 "norlaw:= unapply(`stats/statevalf/pdf/functions/normald`(t,m, s), m,s,t);\nNorlaw:= proc(m, s,t) evalf(1/2*'erfc'((m-t)/s/sqrt(2)))e nd;\nINorlaw:= (m,s,t)->stats[statevalf,icdf,normald[m,s]](t):\ngauss: = unapply(norlaw(0,1,t),t);\nGauss:= t-> evalf(1/2*erfc(-1/2*t*sqrt(2) ));\nIGauss:= t-> INorlaw(0,1,t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 211 "INorlaw:= proc(m,s,x) option `Copyright revisited`; \nglobal `stats/statevalf/appxinvnormal`, newraph;\n evalf( newraph(x, y-> Norlaw(m,s,y), y-> norlaw(m,s,y), `stats/statevalf/appxinvnormal `(x)*s + m))\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 " seq(k=INorlaw(10, 3, evalf(Norlaw(10,3,k), Digits+2) ), k=2..20): map( ASSERT, [%]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "gamma_law:= (x,a)-> x^(a-1)* exp(-x/1)/GAMMA(a)/1^a;\nchi2:= unapply(gamma_law(x/2, nu/2)/2, x, nu) ; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 206 "chi2:= unapply(`stat s/statevalf/pdf/functions/chisquare`(t,nu), nu,t);\nChi2:= unapply(`st ats/statevalf/cdf/functions/chisquare`(t,nu), nu,t);\nIChi:= (nu,t)->` stats/statevalf/icdf/functions/chisquare`(t,nu):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 418 "IChi:= proc(nu, x) local appx; option `Copyr ight revisited`;\nglobal `stats/statevalf/appxinvnormal`, newraph;\n i f 100 < nu then appx := evalf(1/2*(`stats/statevalf/appxinvnormal`(x) \+ + sqrt(2*nu - 1))^2)\n else appx := evalf(nu*(1 - 2/9*1/nu + sqrt(2/9* 1/nu)*`stats/statevalf/appxinvnormal`(x))^3)\n end if; \n if appx < 1/ 100000 then appx := 1/100000 end if;\n newraph(x, y-> Chi2(nu,y), y-> \+ chi2(nu,y), appx, 0)\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "seq(k=IChi(10, Chi2(10,k)),k=2..20): map(ASSERT, [%]):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 91 "protect('gauss', 'Gauss', 'IGauss', 'norlaw', 'Norl aw', 'INorlaw', 'chi2', 'Chi2', 'IChi');" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "ever_load:= ever_load, norlaw, Norlaw, INorlaw, gauss , Gauss, IGauss, gamma_law, chi2, Chi2, IChi;" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 76 "Routines r\351\351crites (xtally, histo, xcompar_his to, histo_arr, chi2_tst, xcov)" }}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 30 "xtally (ne PAS utiliser tally)" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 233 "unprotect(`simul/islessequal`);\n`simul/islessequal`:= proc(a ,b) global `stats/islessequal`; \n`stats/islessequal`(a,b); \nif membe r(%, \{true, false\}) then return % else error \"can't compare \",a,b \+ fi; \nend: protect(`simul/islessequal`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 909 "`simul/tally`:= \nproc(data, topname) global tally_t able, Weight, `stats/data`, `stats/abort`;\nlocal count, item, valeur; \noption `Copyright (c) 1993 by Waterloo Maple Inc. All rights reserve d.`;\n if nargs <> 2 then RETURN(`stats/abort`(topname, \n [topname, '`Incorrect number of arguments`'], [args]))\n end if;\n if not type( data, `stats/data`) then RETURN(`stats/abort`(topname, \n [topname, \+ '`requires data of type stats/data, received`', data], [args]))\n end \+ if;\n tally_table := table();\n for item in data do\n if type(item, f unction) and op(0, item) = 'Weight' \n then valeur := op(1, item); \+ count := op(2, item)\n else valeur := item; count := 1\n end if;\n if assigned(tally_table[valeur]) then tally_table[valeur] := tally_t able[valeur] + count\n else tally_table[valeur] := count\n end if\n \+ end do;\nmap(Weight@op, (op@eval)(tally_table));\ntry sort(%, `simul/i slessequal`);\ncatch : %\nend try \nend;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 282 "`simul/xtally`:= proc() \noption `Copyright (c) 20 02 by PLD. All rights reserved.`;\nglobal `stats/transform/functions/t ally`;\n stats['transform', 'tally'](['red', 'blue', 'red']):\n `sta ts/transform/functions/tally`:= eval(`simul/tally`):\n stats['transfo rm', 'tally'](args); \nend;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 138 "simul[xtally]:= `simul/xtally` :\never_load:= ever_load, `simul /islessequal`, `simul/tally` : \nxsavelib(`simul/xtally`, \"simul/xtal ly.m\") :" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 37 "xcutn (g\350re les colonnes extremales) " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1003 " `simul/xcutn`:= proc(li_::list,n::positive) global count: \nlocal li, j, M, res, yet, oldyet,base,base2,top,delta,k;\nli:= `simul/xtally`(l i_); M:= count(li); res:= array(1..n);\nj:=1; top:= M/n; oldyet:=0; ye t:=0; \nop(1,li[1]); base:= `if`(type(%,range),lhs(%),%);\nfor k from \+ 1 to nops(li) do yet:=yet+op(2,li[k]);\nif yet >= top then \n base2:= \+ op(1,li[k]); if type(base2,range) then base2:= rhs(base2)\n elif j " 0 "" {MPLTEXT 1 0 74 "simul[xcutn]:= `simul/xcutn` : \nxs avelib(`simul/xcutn`, \"simul/xcutn.m\") :" }}}}{SECT 0 {PARA 4 "" 0 " " {TEXT -1 21 "histo : histogrammes " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "macro(old_histo= `stats/statplots/functions/histogram `);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5130 "`simul/xhisto`:= p roc() global Weight, `stats/statplots/plotformat`,\n `stats/statplots/ plot_options`, `stats/data`, lasterror;\nlocal clean, common, datarang e, equal, extra, plotargs, plotcommand, i, jj, nclasses, npoints, queu elh, queuerh, scaleby, scalef, splitdata, splitdata2, tallied, viewing , width, dim, data, num, lines, numlines, polys, numpolys, xtra, x, y, r, temp;\noption `Copyright (c) 2003-2005 - PLD for the fixes to all \+ these many bugs !!! `;\n## area= ??? ; \n plotargs := NULL; extra:='e xtra' ;\n dim := 0;\n data := array(1 .. nargs);\n scalef := 1;\n equa l := false;\n nclasses := 0;\n for i to nargs do\n if type(args[i], ` stats/data`) then dim := dim + 1; data[dim] := args[i]\n elif type(ar gs[i], `=`) then\n if rhs(args[i]) = NULL then error \"bad argument \+ NULL %1\", args[i]\n elif lhs(args[i]) = 'area' then\n temp := rh s(args[i]);\n if type(temp, name) then\n scalef := traperror(st ats['describe', temp]);\n if temp = lasterror then error \"bad arg ument to area= %1\", temp end if\n elif type(temp, numeric) then sc alef := temp\n else error \"bad argument to area= %1\", temp\n e nd if;\n equal := true\n elif lhs(args[i]) = 'numbars' then\n \+ nclasses := rhs(args[i]);\n if not type(nclasses, constant) or ncla sses <= 0 or frac(nclasses) <> 0 then\n error \"bad argument to nu mbars= %1\", nclasses\n end if\n else plotargs := plotargs, args[ i]\n end if\n else error \"bad argument to histogram %1\", args[i] \n end if\n end do;\n if dim = 0 then error \"empty plot\" end if;\n \+ if 1 < dim then\n plotcommand := 'PLOT3D';\n plotargs := plotargs, ' orientation' = [75, 165];\n plotargs := `stats/statplots/plot_options `(dim + 1, plotargs)\n else plotcommand := 'PLOT'\n end if;\n num := a dd(nops(data[i]), i = 1 .. dim);\n lines := array(1 .. num);\n numline s := 0;\n polys := array(1 .. num);\n numpolys := 0;\n xtra := NULL;\n for i to dim do\n clean := stats['transform', 'deletemissing'](data[ i]);\n tallied := stats['transform', 'tally'](clean);\n datarange := stats['describe', 'range'](clean);\n if dim = 1 then\n temp := 1/1 0*op(2, datarange) - 1/10*op(1, datarange);\n viewing := op(1, datar ange) - temp .. op(2, datarange) + temp;\n plotargs := `stats/statpl ots/plot_options`(dim + 1, 'view' = [viewing, 'DEFAULT'], plotargs)\n \+ else xtra := i - 1 .. i - .5\n end if;\n scaleby := scalef(data[i]) ; \n npoints := nops(tallied); \n if not hastype(tallied, 'range') \+ then\n if nclasses = 0 then \n nclasses := floor(piecewise(npoin ts < 30, 1/4*npoints + 1, 4 + log(8*npoints)))\n end if;\n if equa l then\n width := (op(2, datarange) - op(1, datarange))/nclasses;\n if width = 0 then width := 1 end if;\n tallied := stats['transf orm', 'tallyinto'[extra]](tallied,\n [seq(op(1, datarange) + j*wid th .. op(1, datarange) + (j + 1)*width, \n j = 0 .. nclasses - \+ 1)]);\n tallied := stats['transform', 'statsort'](tallied);\n if extra <> 'extra' then\n tallied := subsop(-1 = Weight(op(stats['t ransform', 'statvalue']([tallied[-1]])),\n stats['describe', 'cou nt']([tallied[-1], op(extra)])), tallied);\n extra := 'extra'\n \+ end if;\n scaleby := scaleby/stats['describe', 'count'](tallied); \+ \n tallied := stats['transform', 'scaleweight'[scaleby]](tallied)\n else\n splitdata := stats['transform', 'split'[nclasses]]\n \+ (stats['transform', 'statsort'](tallied));\n splitdata := map( (x, N) -> \n Weight(stats['describe', 'range'](x), N), split data, scaleby/nclasses); \n splitdata2 := NULL;\n queuelh := op( 1, splitdata);\n splitdata := subsop(1 = NULL, splitdata);\n que uelh := op(stats['transform', 'statvalue']([queuelh])), stats['describ e', 'count']([queuelh]);\n queuelh := op(1, queuelh[1]), op(2, queu elh[1]), queuelh[2];\n while 0 < nops(splitdata) do\n queuerh : = op(1, splitdata);\n splitdata := subsop(1 = NULL, splitdata);\n \+ queuerh := op(stats['transform', 'statvalue']([queuerh])), stats[' describe', 'count']([queuerh]);\n queuerh := op(1, queuerh[1]), op (2, queuerh[1]), queuerh[2];\n common := 1/2*queuelh[2] + 1/2*queu erh[1];\n splitdata2 := splitdata2, Weight(queuelh[1] .. common, q ueuelh[3]);\n queuelh := common, queuerh[2], queuerh[3]\n end d o;\n tallied := [splitdata2, Weight(queuelh[1] .. queuelh[2], queue lh[3])]\n end if\n else \n scaleby:= scaleby/stats['describe', ' count'](tallied); \n tallied:=[seq(Weight(op(1,k),op(2,k)*scaleby), k=tallied)]; \n end if;\n for jj to nops(tallied) do\n if type( tallied[jj], function) and op(0, tallied[jj]) = 'Weight' then\n x : = op(1, tallied[jj]); y := op(2, tallied[jj])\n else x := tallied[jj ]; y := 1\n end if;\n if type(x, range) then\n r := op(2, x) - \+ op(1, x);\n if r <> 0 then y := y/r end if;\n numpolys := numpol ys + 1;\n polys[numpolys] := [x, 0 .. y, xtra]\n else\n if dim = 1 then numlines := numlines + 1; lines[numlines] := [x, 0 .. y, xtr a]\n else numpolys := numpolys + 1; polys[numpolys] := [x, 0 .. y, \+ xtra]\n end if\n end if\n end do\n end do;\n temp := plotcommand (\n `stats/statplots/plotformat`([], convert(lines, list)[1 .. numlin es], convert(polys, list)[1 .. numpolys]),\n plotargs)\nend proc; " } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2502 "`simul/histo`:= proc(stt::\{array, list\}, kmax_ ) \nglobal Weight, old_histo, displayf, xoption;\nlocal i, ii, count, \+ siz, kmax, interv, mino, maxo, tally, st, \n sav_value, xla_value, f un_value, eps_value, ran_value, fac_value, opt;\nopt := [args[3 .. -1] ]; \n fac_value := xoption(opt, 'fac', false);\n fun_value := xoption (opt, 'fun', false);\n ran_value := xoption(opt, 'ran', false);\n sav_ value := xoption(opt, 'sav', false);\n xla_value := xoption(opt, 'xla' , 0);\n# fus_ := xoption(opt, 'fus', 1);\n# cut_ := xoption(opt, 'cut' , false);\n \nopt:= op(opt):\nif type(stt, array) then st := stt; siz \+ := op(2, op(2, eval(st)))\n else siz := nops(stt); st := array(sort(st t))\nfi;\nmino := st[1]; maxo := st[siz]; \n if ran_value=false \n the n # ran_value not assigned\n if typematch(kmax_, identical('eps') = e ps_value::anything)\n then kmax:= (maxo-mino)/eps_value+1\n else k max:= kmax_ ; eps_value:= (maxo-mino)/(kmax-1);\n fi; \n else \n if lhs(ran_value)maxo then maxo:= rhs(ran_value) fi; \n if typematch(kmax_, ident ical('eps') = eps_value::anything)\n then kmax:= (maxo-mino)/eps_va lue\n else kmax:= kmax_ ; eps_value:= (maxo-mino)/(kmax);\n fi; \+ \n fi:\ninterv := seq(mino+eps_value*gk, gk = 0..kmax);\n if opt <> NU LL then opt := \n 'view' = [mino+xla_value .. interv[-1]+xla_value, \+ 'DEFAULT'], opt \n fi;\n ii := 1;\n count := 0;\n tally := NULL;\n for i to siz do\n if st[i] < interv[ii + 1] then count := count + 1\n e lse\n tally := tally, Weight(interv[ii] + xla_value .. interv[ii + 1 ] + xla_value, count);\n count := 0;\n i := i - 1;\n ii := ii + \+ 1\n fi\n od;\n tally := [tally, Weight(interv[ii]+ xla_value .. inter v[ii + 1]+ xla_value, count)];\nif sav_value <> false then map( \n pro c(x,y) local a,b,c; typematch(x, Weight(a::anything..b::anything, c::a nything));\n Weight(a-y..b-y,c); end, tally, xla_value); assign(eval(s av_value,1), array(%) );\nfi;\n\nif fun_value <> false then\n if fun_v alue='delta' then fun_value:= 1/(interv[-1]-interv[1]) fi;\n if has(fu n_value, floor) \n then opt:= plots['pointplot']([ mino+xla_value,0, \+ seq(\n op([gk+xla_value,fun_value(gk), gk+1+xla_value,fun_value(gk) , gk+xla_value+1,0]),\n gk=mino..maxo-1)], 'style'='line'), opt;\n \+ else \n opt:= plot(['x'+xla_value,fun_value('x'), 'x'=mino .. interv [-1]], 'color'='black'),opt;\n fi;\nfi;\n if fac_value= false then fa c_value:= siz; fi;\n map(proc(z, fac_) subsop(2 = op(2, z)/fac_, z) en d, tally, fac_value);\n displayf(old_histo(%, 'color'='gray'), opt)\ne nd:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 151 "simul[histo]:= `sim ul/histo` : xsavelib(`simul/histo`, \"simul/histo.m\") :\nsimul[xhisto ]:= `simul/xhisto` : xsavelib(`simul/xhisto`, \"simul/xhisto.m\") :" } }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 13 "xcompar_histo" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 437 "`simul/xcompar_histo`:= proc(ex::list, t h::list) global mihis, display, xhisto; \nlocal nn; nn:= nops(th); \ni f map2(op,1,ex) <> map2(op,1,th) then \n error '`: les deux structur es n'ont pas le m\352me support`'\nfi;\nmihis:= [seq('Weight'( op(1,th [j]), min(op(2,th[j]),op(2,ex[j]))), j=1..nn)]; \ndisplay(xhisto(mih is, 'color'='grey', args[3..-1]), xhisto(ex, 'color'='cyan', args[3..- 1]) \n, xhisto(th, 'color'='yellow', args[3..-1]));\nend: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 106 "simul[xcompar_histo]:= `simul/xcom par_histo` : \nxsavelib(`simul/xcompar_histo`, \"simul/xcompar_histo.m \") :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 28 "histo_arr : histo from simul" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1930 "`simul/histo_arr`:= proc(stt::arr ay) global displayf, Weight, old_histo, xoption; \nlocal Qloc, i, k, \+ kmax, mino, maxo, tally, \nfus_, ran_, sav_, xla_, fun_, fac_, eps_, c ut_, opt;\n opt := [args[2 .. -1]];\n fus_ := xoption(opt, 'fus', 1); \n fac_ := xoption(opt, 'fac', false);\n fun_ := xoption(opt, 'fun', f alse);\n ran_ := xoption(opt, 'ran', false);\n sav_ := xoption(opt, 's av', false);\n xla_ := xoption(opt, 'xla', 0);\n cut_ := xoption(opt, \+ 'cut', false);\n\n opt := op(opt);\nif cut_ <> false then \n opt:= op t, 'view' = [op(1,cut_)+xla_ .. op(2,cut_)+xla_, 'DEFAULT']; \nfi;\n\n Qloc:= op(2, op(2, eval(stt))); # for Qloc1 from Qloc by -1 while stt [Qloc1]=0 do od; \n \nif (ran_=false) then ERROR (\"missing ran parame ter\") fi;\n mino := lhs(ran_); maxo:= rhs(ran_);\n eps_:= (maxo-mino) /Qloc*fus_;\n kmax:= floor(Qloc/fus_); maxo:= mino+(kmax+1)*eps_;\n\nt ally := NULL; i := 'i';\nfor k from 0 to kmax-1 do \n tally := tally, \+ Weight(mino + eps_*k+ xla_ .. mino + eps_*(k+1)+ xla_,\n \+ add(stt[k*fus_+i], i=0..fus_-1) );\nod; tally := [tally, Weight(mi no + eps_*kmax+ xla_ .. mino + eps_*(kmax+1)+ xla_,\n \+ add(stt[i], i=kmax*fus_..Qloc) )];\n \nif sav_ <> false then\n map(pr oc(x, y) local a, b, c;\n typematch(x, Weight((a::anything) .. (b:: anything), c::anything)); \n Weight(a - y .. b - y, c)\n end, tal ly, xla_); assign(eval(sav_, 1), array(%) )\nfi;\n\nif fun_ <> false t hen\n if fun_ = 'delta' then fun_ := 1/(maxo - mino) fi;\n if has(fun_ , floor) \n then opt := plots['pointplot']([mino + xla_, 0, seq(\n \+ op([gk + xla_, fun_(gk), gk + 1 + xla_, fun_(gk), gk + 1 + xla_, 0]), \n gk = mino .. maxo - 1)], 'style' = 'line'), opt\n else \n opt \+ := plot(['x' + xla_, fun_('x'), 'x' = mino .. maxo], 'color' = 'black' ),\n opt;\n fi\nfi;\n\nif fac_ = false then fac_ := add(stt[i], i =0..Qloc) fi;\n\nmap(proc(z, fac_) subsop(2 = op(2, z)/fac_, z) end, t ally, fac_);\ndisplayf(old_histo(%, 'color' = 'gray'), opt)\nend:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "simul[histo_arr]:= `simul/hi sto_arr` : \nxsavelib(`simul/histo_arr`, \"simul/histo_arr.m\") :" }}} }{SECT 0 {PARA 4 "" 0 "" {TEXT -1 25 "chi2_tst : test du chi_2 " }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "tri_xy:= proc(x,y) evalb(op( [1,1],x) " 0 "" {MPLTEXT 1 0 1695 "`simul/chi2_tst`:= proc(hist, law) \nglobal chisquare, hist1_, h ist2_, Weight, xoption, concat, transpose, ``; \nlocal k, xx, nu, a1, b1, c1, a2, b2, c2, opt, verb_, seuil_;\na1:='a1':a2:='a2':b1:='b1':b 2:='b2':c1:='c1':c2:='c2':\nopt := [args[2 .. -1]];\nverb_ := xoption( opt, 'verb', false);\nseuil_ := xoption(opt, 'seuil', 5);\n\n map(proc (z) if type(z, range) then Weight(z, 1) else z fi end, convert(hist, l ist));\n hist1_ := sort(%, 'tri_xy');\n k := 1;\n while k < nops(hist1 _) do\n typematch(hist1_[k], Weight(('a1'::numeric) .. ('b1'::numeric ), 'c1'::numeric));\n if c1 < seuil_ then\n typematch(hist1_[k + 1] , Weight(('a2'::numeric) .. ('b2'::numeric), 'c2'::numeric));\n hist 1_ := subsop(k = NULL, k + 1 = Weight(a1 .. b2, c1 + c2), hist1_)\n e lse k := k + 1\n fi\n od;\n while 1 < k do\n typematch(hist1_[k], We ight(('a1'::numeric) .. ('b1'::numeric), 'c1'::numeric));\n if c1 < s euil_ then\n typematch(hist1_[k - 1], Weight(('a2'::numeric) .. ('b2 '::numeric), 'c2'::numeric));\n hist1_ := subsop(k = NULL, k - 1 = W eight(a2 .. b1, c1 + c2), hist1_);\n k := k - 1\n else break\n fi \n od;\n hist2_ := map(proc(z, laww) local t, qq; t := 't'; \n if has (laww, floor) \n then qq:= add(laww(t), t= op([1,1],z)..op([1,2],z)-1 ) \n else qq:= evalf(Int(laww(t), t = op(1, z)))\n fi; [op([1, 1], z ), op(2, z), qq, (op(2,z)-qq)^2/qq] \n end, hist1_, law);\n\n if verb _ then \n #print(matrix([map(round,%[1]), %[2], map(round,%[3])])); \+ \n print(map(round, concat(transpose(%), [op([-1, 1, 2], hist1_), ``, ``, 'chi^2'])))\n fi;\n map2(op,4,hist2_);\n nu := nops(%) - 1;\n xx \+ := convert(%%, `+`);\n stats['statevalf', 'cdf', chisquare[nu]](xx);\n 'deg_lib' = nu, 'x' = evalf(xx, 4), 'percent' = evalf(%, 3)\nend: " } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "simul[chi2_tst]:= `simul/c hi2_tst` : \nxsavelib(`simul/chi2_tst`, tri_xy, `simul/chi2_tst.m`) : " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 " " 0 "" {TEXT -1 4 "xcov" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 517 " toto:= convert(eval(`stats/describe/functions/covariance`), string):\n searchtext(\"sum := sum+\", toto):\ntoto:= cat(substring(toto, 1..%+10 ), \"item_count1*\", substring(toto, %+11..-1)):\ndeb:= searchtext(\"C opyright\", toto): fin:= searchtext(\"reserved.`\", toto[deb..-1]):\nc at(substring(toto,1..deb-1), \"Copyright (c) 2005 by Pierre L. Douille t. Only authorized persons can use the correct algorithm. All other pe ople ***MUST*** use the buggy original Waterloo version\", substring(t oto, deb+fin+8..-1)): \nxcov:= parse(%); " }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 28 "ever_load:= ever_load, xcov;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 " " 0 "" {TEXT -1 29 "Simulation de files d'attente" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "new_c lient (permet la gestion de srv0 et de resi0)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "unprotect(new_client):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 427 "new_client:= proc() global agenda, charge, arv, srv; local ar v0, srv0, i, resi0;\n arv0, srv0 := arv(), srv();\n if nops(agenda)=0 \+ then resi0:=0 else resi0:= op(1, agenda[1]) fi;\n charge := charge + s rv0;\n agenda := [op(agenda), [charge, 'D']];\n for i to nops(agenda) \+ do if arv0 < agenda[i][1] then break end if end do;\n agenda := [op(ag enda[1 .. i - 1]), [arv0, 'A'], op(agenda[i .. -1])];\n client_observe (srv0, resi0)\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "evol_file" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 300 "`simul/evol_file`:= proc() global agenda, charge; \+ local quoi, delai, nature;\nserveur_observe(); \nquoi:= agenda[1]; del ai, nature:= op(quoi); \nagenda:= [seq([agenda[j][1]-delai, agenda[j] [2]], j=2..nops(agenda))];\ncharge:= max(charge-delai,0);\nif nature = 'A' then new_client() fi; return NULL ;\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 "serveur_observe" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 229 "unprotect(serveur_observe):\nserveur_observe:= proc() global dure es, agenda; local n, delai;\nn:= nops(agenda)-1; delai:= agenda[1][1]; \nif type(durees[n], numeric) then durees[n]:= durees[n]+delai; else d urees[n]:= delai; fi; \nend:" }}}{EXCHG }{EXCHG {PARA 0 "" 0 "" {TEXT -1 14 "client_observe" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 261 "unprotect (client_observe):\nclient_observe:= proc(srv0,resi0) global agenda, se jours, attentes, numcli, charge, autres,resid;\nnumcli:=numcli+1: sejo urs[numcli]:= charge; attentes[numcli]:= charge-srv0;\nautres[numcli]: = nops(agenda)-2; resid[numcli]:= resi0;\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "raz_file (permet la gestion des tables g\351r\351es \+ par clients : sejours, attentes, autres, resid)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 260 "`simul/raz_file`:= proc() \nglobal agenda, charge, s ejours, attentes, numcli, durees, autres, resid;\n agenda, charge := [ [0, 'A']], 0;\n durees := table();\n sejours, numcli := table(), 0;\n \+ attentes := table();\n autres := table(); resid:= table();\n NULL\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 135 "simul[evol_file] := `simul/evol_file` : \nxsavelib(`simul/evol_file`, new_client, serve ur_observe, client_observe, `simul/evol_file.m`) :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "simul[raz_file]:= `simul/raz_file` : \nxsav elib(`simul/raz_file`, `simul/raz_file.m`) :" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 5 "Infos" } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "interface(rtablesize=30):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "(op@eval)(simul): sort(%, proc(a,b) lexorder(lhs(a) , lhs(b)) end): 'elements' = ; " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "'ever_loaded' = < (op@sort)(convert (\{ever_load\}, list)) >;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 119 "ever_load:= op(\{ever_load\}):\never_load_list:= map(proc(z) cat( ` `,z) end, sort([ever_load]));\nsimul['ever_loaded']:= %:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 118 "simul6:= proc() option package; en d;\nsimul6('_InitFile'):= eval(`simul/init`);\nsimul6('_PackageTable') := eval(simul); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 29 "xsavelib(simul6, `simul6.m`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "xsavelib('simul', `simul/init`, ever_load, 'e ver_load_list', `simul.m`);" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 8 "Contr\364le" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "protect(`simul/xtally`, client_obse rve, new_client, serveur_observe):\n_seed:= '_seed':" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "eval(ssavelib, 1);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "lasterror:= 'lasterror' : map(xmint, sort(eval([ssavelib],1), lexorder)): " }}}}{EXCHG {PARA 258 "" 0 "" {TEXT -1 64 "Copyright (c) 1999-2007 Pierre L. Douillet \n" }}{PARA 258 "" 0 "" {TEXT -1 11 "licence GPL" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 195 "libre \+ reproduction pour un usage universitaire sous reserve d'une copie comp l\350te,\navec reproduction du programme source dont, en particulier, \+ la pr\351sente mention\n \n\naucune garantie de fiabilit\351. " }} {PARA 258 "" 0 "" {TEXT -1 89 "en particulier, toute utilisation dans \+ un contexte industriel est vivement d\351conseill\351e\n " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "21 7 1 0" 59 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }