Package jmt.engine.NetStrategies.RoutingStrategies

Examples of jmt.engine.NetStrategies.RoutingStrategies.RandomStrategy


      Simulation sim = new Simulation(-1, testName);
      sim.addClasses(classes);

      //terminal
      RandomStrategy[] rrs_term = new RandomStrategy[1];
      rrs_term[0] = new RandomStrategy();

      int[] numJobs = { N }; //variable population

      ServiceTimeStrategy[] ds = { new ServiceTimeStrategy(DelayExp[0], DelayPar[0]) };

      sim.addNode("terminal", new Terminal(numJobs), new Delay(ds), new Router(rrs_term));

      //server 1
      ServiceStrategy[] serv_strat1 = new ServiceStrategy[1];
      serv_strat1[0] = new ServiceTimeStrategy(serverExp1[0], serverPar1[0]);

      RandomStrategy[] rrs_serv1 = new RandomStrategy[1];
      rrs_serv1[0] = new RandomStrategy();

      sim.addNode("server1", new Queue(-1, false, null, null), new Server(1, null, serv_strat1), new Router(rrs_serv1));

      //server 2
      ServiceStrategy[] serv_strat2 = new ServiceStrategy[1];
      serv_strat2[0] = new ServiceTimeStrategy(serverExp2[0], serverPar2[0]);

      RandomStrategy[] rrs_serv2 = new RandomStrategy[1];
      rrs_serv2[0] = new RandomStrategy();

      sim.addNode("server2", new Queue(-1, false, null, null), new Server(1, null, serv_strat2), new Router(rrs_serv2));

      //connections
      sim.addConnection("terminal", "server1");
View Full Code Here

TOP

Related Classes of jmt.engine.NetStrategies.RoutingStrategies.RandomStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.