Unit User; { Message transmission } Interface Uses Crt, Simpet5, Randoms, Statist, UserPart; {------------------------------------------------------} { Required by PETRISIM: } Procedure UserInit; { User model initialization } Procedure UserEval; { User experiment evaluation } Const UserNetInfo = 'Message transmission'; {------------------------------------------------------} Implementation { Here you CAN declare anything. You HAVE to define bodies of the above procedures. } {------------------------------------------------------} Procedure UserInit; { User model initialization } { Select one of the defaults or create your own } Begin { StandardInit; { Default with prompts } StandardFastInit; { Fast default } End; {------------------------------------------------------} Procedure Results(Var R: Text); { Saves results to R } Var N : LongInt; U,FAv,FMin,FMax,FVa,FS,L : Real; Begin WriteLn(R,'EXPERIMENT EVALUATION'); WriteLn(R,'Experiment Length = ',MaxTime:15:3); WriteLn(R,'Current Time = ',PNTime:15:3); WriteLn(R); WriteLn(R,'Model: ',UserNetInfo); WriteLn(R); TResults('t1',U,FAv,FMin,FMax,FVa,FS,N); { Returns transition results } WriteLn(R,'Number of transmitted messages: ',N); WriteLn(R,'Average transmission duration: ',FAv:6:3); WriteLn(R); End; {------------------------------------------------------} Procedure ModelEvaluation; { Model specific evaluation } Var F : Text; { You can leave this as it is } FName : String; Begin TextBackGround(Black); TextColor(Green); ClrScr; FName := PrepareFile; Assign(F,FName); Rewrite(F); Results(F); Close(F); Assign(F,'CON'); Rewrite(F); Results(F); WriteLn; Write('Results stored in the file ', FName, ' Press Enter to continue'); Readln; End{ModelEvaluation}; {------------------------------------------------------} Procedure UserEval; { User model evaluation } Begin { ShowThemAll; { Default - separate reports } { ShowThemInTable; { Default - tables } ModelEvaluation; { Model specific } End; End.