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/ exit = begin & a procedure exec every time it runs 37 print(" "); & blank line 38 print ("class, throughput"); 39 for r_class := all class do 40 begin 41 print(r_class.cl_name, mthruput(terms,r_class)); 42 &mthruput(station,class) is a reserved var 43 end; 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 end; 77 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 * * * * * * * * * terms * 26.99 * 0. * 14.06 * 26.99 *0.5211 * * * * * * * * * disk 1 *0.1200e-01*0.2219e-01*0.2261e-01*0.1223e-01* 1.849 * * * * * * * * * disk 2 *0.1800e-01*0.2421e-01*0.2476e-01*0.1840e-01* 1.345 * * * * * * * * ******************************************************************* memory used: 4277 words of 4 bytes ( 1.64 % of total memory) class, throughput ==>warning (inter) : result not available ... zero assumed ... line number : 41 data-base class 1 0. ==>warning (inter) : result not available ... zero assumed ... line number : 41 data-base class 2 0. ==>warning (inter) : result not available ... zero assumed ... line number : 41 administrator 0. 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 * * * * * * * * * terms * 25.26 * 0. * 16.10 * 25.26 *0.6373 * * * * * * * * * disk 1 *0.1200e-01*0.3615e-01*0.3743e-01*0.1242e-01* 3.013 * * * * * * * * * disk 2 *0.1800e-01*0.2279e-01*0.2328e-01*0.1838e-01* 1.266 * * * * * * * * ******************************************************************* memory used: 4335 words of 4 bytes ( 1.67 % of total memory) class, throughput ==>warning (inter) : result not available ... zero assumed ... line number : 41 data-base class 1 0. ==>warning (inter) : result not available ... zero assumed ... line number : 41 data-base class 2 0. ==>warning (inter) : result not available ... zero assumed ... line number : 41 administrator 0. 78 /terminal/ ==>warning (edit) : end of file detected on unit 4 (input)