public TheModel() { this.Server = 10000; base.AddName("Server", this.Server); TheModel theModel = this; Storage storage = new Storage(new ParExpression(new ExpressionDelegate(theModel.Verb1_Operand1))); storage.SetId(this.Server); base.AddVerb(storage); TheModel theModel1 = this; Start start = new Start(new ParExpression(new ExpressionDelegate(theModel1.Verb2_Operand1)), null, null, null); base.AddVerb(start); TheModel theModel2 = this; Generate generate = new Generate(new ParExpression(new ExpressionDelegate(theModel2.Verb3_Operand1)), null, null, null, null); base.AddVerb(generate); this.GenerateCounter = 10001; base.AddName("GenerateCounter", this.GenerateCounter); TheModel theModel3 = this; TheModel theModel4 = this; Savevalue savevalue = new Savevalue(new ParExpression(new ExpressionDelegate(theModel3.Verb4_Operand1)), new ParExpression(new ExpressionDelegate(theModel4.Verb4_Operand2))); base.AddVerb(savevalue); this.Tail = 10002; base.AddName("Tail", this.Tail); this.GoAway = 10003; base.AddName("GoAway", this.GoAway); LiteralOperand literalOperand = new LiteralOperand("L"); TheModel theModel5 = this; ParExpression parExpression = new ParExpression(new ExpressionDelegate(theModel5.Verb5_Operand2)); TheModel theModel6 = this; TheModel theModel7 = this; Test test = new Test(literalOperand, parExpression, new ParExpression(new ExpressionDelegate(theModel6.Verb5_Operand3)), new ParExpression(new ExpressionDelegate(theModel7.Verb5_Operand4))); base.AddVerb(test); TheModel theModel8 = this; Queue queue = new Queue(new ParExpression(new ExpressionDelegate(theModel8.Verb6_Operand1)), null); base.AddVerb(queue); TheModel theModel9 = this; TheModel theModel10 = this; Enter enter = new Enter(new ParExpression(new ExpressionDelegate(theModel9.Verb7_Operand1)), new ParExpression(new ExpressionDelegate(theModel10.Verb7_Operand2))); base.AddVerb(enter); TheModel theModel11 = this; Depart depart = new Depart(new ParExpression(new ExpressionDelegate(theModel11.Verb8_Operand1)), null); base.AddVerb(depart); TheModel theModel12 = this; Advance advance = new Advance(new ParExpression(new ExpressionDelegate(theModel12.Verb9_Operand1)), null); base.AddVerb(advance); TheModel theModel13 = this; TheModel theModel14 = this; Leave leave = new Leave(new ParExpression(new ExpressionDelegate(theModel13.Verb10_Operand1)), new ParExpression(new ExpressionDelegate(theModel14.Verb10_Operand2))); base.AddVerb(leave); this.RejetionProb = 10004; base.AddName("RejetionProb", this.RejetionProb); this.RejectCounter = 10005; base.AddName("RejectCounter", this.RejectCounter); TheModel theModel15 = this; TheModel theModel16 = this; Savevalue savevalue1 = new Savevalue(new ParExpression(new ExpressionDelegate(theModel15.Verb11_Operand1)), new ParExpression(new ExpressionDelegate(theModel16.Verb11_Operand2))); base.AddVerb(savevalue1); TheModel theModel17 = this; Terminate terminate = new Terminate(new ParExpression(new ExpressionDelegate(theModel17.Verb12_Operand1))); base.AddVerb(terminate); this.GoAway = 11; base.ReplaceNameId("GoAway", this.GoAway); TheModel theModel18 = this; TheModel theModel19 = this; Savevalue savevalue2 = new Savevalue(new ParExpression(new ExpressionDelegate(theModel18.Verb13_Operand1)), new ParExpression(new ExpressionDelegate(theModel19.Verb13_Operand2))); base.AddVerb(savevalue2); base.AddVerb(new Terminate(null)); }
public MM3Model_Dynamic() { // Server STORAGE 3 this.SERVER = 10000; this.AddName("SERVER", SERVER); AnyCommand command1 = new Storage(new ParExpression(this.Command1_Operand1)); command1.SetId(this.SERVER); this.AddVerb(command1); // START 1000 AnyCommand command2 = new Start(new ParExpression(this.Command2_Operand1), null, null, null); this.AddVerb(command2); // GENERATE (Exponential(1,0,1/2)) AnyBlock block1 = new Generate(new ParExpression(this.Block1_Operand1), null, null, null, null); this.AddVerb(block1); // SAVEVALUE GenerateCounter,X$GenerateCounter+1 this.GENERATECOUNTER = 10001; this.AddName("GENERATECOUNTER", GENERATECOUNTER); AnyBlock block2 = new Savevalue(new ParExpression(this.Block2_Operand1), new ParExpression(this.Block2_Operand2)); this.AddVerb(block2); // TEST L Q$Tail,20,GoAway ;Jump if in Queue >20 this.TAIL = 10002; this.AddName("TAIL", TAIL); this.GOAWAY = 10003; this.AddName("GOAWAY", GOAWAY); AnyBlock block3 = new Test(new LiteralOperand("L"), new ParExpression(this.Block3_Operand2), new ParExpression(this.Block3_Operand3), new ParExpression(this.Block3_Operand4)); this.AddVerb(block3); // QUEUE Tail AnyBlock block4 = new Queue(new ParExpression(this.Block4_Operand1), null); this.AddVerb(block4); // ENTER Server,1 AnyBlock block5 = new Enter(new ParExpression(this.Block5_Operand1), new ParExpression(this.Block5_Operand2)); this.AddVerb(block5); // DEPART Tail AnyBlock block6 = new Depart(new ParExpression(this.Block6_Operand1), null); this.AddVerb(block6); // ADVANCE (Exponential(2,0,1/0.2)) AnyBlock block7 = new Advance(new ParExpression(this.Block7_Operand1), null); this.AddVerb(block7); // LEAVE Server,1 AnyBlock block8 = new Leave(new ParExpression(this.Block8_Operand1), new ParExpression(this.Block8_Operand2)); this.AddVerb(block8); // SAVEVALUE RejetionProb,(X$RejectCounter/X$GenerateCounter) this.REJETIONPROB = 10004; this.AddName("REJETIONPROB", REJETIONPROB); this.REJECTCOUNTER = 10005; this.AddName("REJECTCOUNTER", REJECTCOUNTER); AnyBlock block9 = new Savevalue(new ParExpression(this.Block9_Operand1), new ParExpression(this.Block9_Operand2)); this.AddVerb(block9); // TERMINATE 1 AnyBlock block10 = new Terminate(new ParExpression(this.Block10_Operand1)); this.AddVerb(block10); // GoAway SAVEVALUE RejectCounter,X$RejectCounter+1 this.GOAWAY = 11; this.ReplaceNameId("GOAWAY", GOAWAY); AnyBlock block11 = new Savevalue(new ParExpression(this.Block11_Operand1), new ParExpression(this.Block11_Operand2)); this.AddVerb(block11); // TERMINATE ;Delete rejected. AnyBlock block12 = new Terminate(null); this.AddVerb(block12); }