simulog *** qnap2 *** (octobre 1984) v03 (c) copyright by cii honeywell bull and inria, 1982 1 & ex2 for 576 2 & multi-class version of ex1 3 4 /declare/ integer n_disk = 2; & global variables 5 class integer n_term; & one var per class 6 class real trans(n_disk); & dimension n_disk must be init. 7 queue real serv_t; & param for every queue queue.serv_t 8 & will serve for all 9 & classes if equal 10 class real cpu_t, term_t; & different for each class at cpu and terminals 11 class string cl_name; 12 queue cpu,terms,disk(n_disk); & station identifiers 13 class dbase1, dbase2, admin; & class ids 14 ref class r_class; & a var ranging over the classes 15 & 16 /station/ name=cpu; 17 sched = ps; 18 service = exp(cpu_t); & here, cpu_t stands 19 & for class.cpu_t 20 transit(all class) = disk(1 step 1 until n_disk), 21 trans(1 step 1 until n_disk), terms, 1; 22 & where list, rel. prob. list, where list, prob list ..; 23 & all class causes the statement to be indexed by class implicitly 24 & 25 /station/ name = disk(1 step 1 until n_disk); 26 transit = cpu; & classes are implicit if homogeneous 27 service = exp(serv_t); 28 & 29 /station/ name = terms; 30 init = n_term; & params here do not have to be init 31 type = infinite; & standard types infinite, multiple, etc. 32 & default type is single server 33 service = exp(term_t); & classes are implicit 34 transit = cpu,1; 35 & 36 /control/ class = all queue 37 exit = begin & a procedure exec every time it runs | ==>warning (control) : ";" has been added before this element 38 print(" "); & blank line 39 print ("class, throughput"); 40 print(dbase1.cl_name, mthruput(terms,dbase1)); 41 print(dbase2.cl_name, mthruput(terms,dbase2)); 42 print(admin.cl_name, mthruput(terms,admin)); 43 &mthruput(station,class) is a reserved var 44 end; 45 & 46 /exec/ begin 47 &init variables 48 dbase1.cl_name:= "data-base class 1"; 49 dbase2.cl_name:= "data-base class 2"; 50 admin.cl_name:= "administrator"; 51 & 52 dbase1.trans:= 9,0; 53 dbase2.trans:= 0,4; 54 admin.trans:= 13,16; 55 & 56 dbase2.n_term:=10; 57 admin.n_term:=1; 58 & 59 dbase1.cpu_t:=0.2; 60 dbase2.cpu_t:=0.1; 61 admin.cpu_t:=1.5; 62 & 63 dbase1.term_t:= 20; 64 dbase2.term_t:= 30; 65 admin.term_t:=120; 66 & 67 disk(1).serv_t:= 0.012; 68 disk(2).serv_t:= 0.018; 69 & 70 & loop for multiple solutions 71 for dbase1.n_term:=5,10 do 72 begin 73 & init variables for each if necessary (none here) 74 print("no of terminals = ", dbase1.n_term); 75 solve; & qnap decides what solver to use (MVA by preference) 76 print(" "); & blank line 77 print ("class, throughput"); 78 print(dbase1.cl_name, mthruput(terms,dbase1)); 79 print(dbase2.cl_name, mthruput(terms,dbase2)); 80 print(admin.cl_name, mthruput(terms,admin)); 81 &mthruput(station,class) is a reserved var 82 end; 83 end; no of terminals = 5. - mean value analysis ("mva") - ******************************************************************* * name * service * busy pct * cust nb * response * thruput * ******************************************************************* * * * * * * * * cpu *0.2060 *0.7654 * 1.889 *0.5084 * 3.715 * *(dbase1 )*0.2000 *0.3975 * 1.003 *0.5046 * 1.988 * *(dbase2 )*0.1000 *0.1589 *0.4454 *0.2804 * 1.589 * *(admin )* 1.500 *0.2090 *0.4405 * 3.161 *0.1393 * * * * * * * * * terms * 26.99 * 0. * 14.06 * 26.99 *0.5211 * *(dbase1 )* 20.00 * 0. * 3.975 * 20.00 *0.1988 * *(dbase2 )* 30.00 * 0. * 9.531 * 30.00 *0.3177 * *(admin )* 120.0 * 0. *0.5574 * 120.0 *0.4645E-02* * * * * * * * * disk 1 *0.1200E-01*0.2219E-01*0.2261E-01*0.1223E-01* 1.849 * *(dbase1 )*0.1200E-01*0.2147E-01*0.2187E-01*0.1222E-01* 1.789 * *(admin )*0.1200E-01*0.7246E-03*0.7413E-03*0.1228E-01*0.6038E-01* * * * * * * * * disk 2 *0.1800E-01*0.2421E-01*0.2476E-01*0.1840E-01* 1.345 * *(dbase2 )*0.1800E-01*0.2287E-01*0.2339E-01*0.1840E-01* 1.271 * *(admin )*0.1800E-01*0.1338E-02*0.1369E-02*0.1843E-01*0.7432E-01* * * * * * * * ******************************************************************* memory used: 4995 words of 4 bytes ( 1.92 % of total memory) class, throughput data-base class 1 0.1988 data-base class 2 0.3177 administrator 0.4645E-02 class, throughput data-base class 1 0.1988 data-base class 2 0.3177 administrator 0.4645E-02 no of terminals = 10. - mean value analysis ("mva") - ******************************************************************* * name * service * busy pct * cust nb * response * thruput * ******************************************************************* * * * * * * * * cpu *0.1941 *0.9542 * 4.838 *0.9839 * 4.917 * *(dbase1 )*0.2000 *0.6604 * 3.359 * 1.017 * 3.302 * *(dbase2 )*0.1000 *0.1520 *0.8581 *0.5646 * 1.520 * *(admin )* 1.500 *0.1418 *0.6204 * 6.563 *0.9453E-01* * * * * * * * * terms * 25.26 * 0. * 16.10 * 25.26 *0.6373 * *(dbase1 )* 20.00 * 0. * 6.604 * 20.00 *0.3302 * *(dbase2 )* 30.00 * 0. * 9.120 * 30.00 *0.3040 * *(admin )* 120.0 * 0. *0.3781 * 120.0 *0.3151E-02* * * * * * * * * disk 1 *0.1200E-01*0.3615E-01*0.3743E-01*0.1242E-01* 3.013 * *(dbase1 )*0.1200E-01*0.3566E-01*0.3692E-01*0.1242E-01* 2.972 * *(admin )*0.1200E-01*0.4916E-03*0.5115E-03*0.1249E-01*0.4096E-01* * * * * * * * * disk 2 *0.1800E-01*0.2279E-01*0.2328E-01*0.1838E-01* 1.266 * *(dbase2 )*0.1800E-01*0.2189E-01*0.2235E-01*0.1838E-01* 1.216 * *(admin )*0.1800E-01*0.9075E-03*0.9282E-03*0.1841E-01*0.5042E-01* * * * * * * * ******************************************************************* memory used: 5433 words of 4 bytes ( 2.09 % of total memory) class, throughput data-base class 1 0.3302 data-base class 2 0.3040 administrator 0.3151E-02 class, throughput data-base class 1 0.3302 data-base class 2 0.3040 administrator 0.3151E-02 84 /terminal/ ==>warning (edit) : end of file detected on unit 4 (input)