示例#1
0
 static void Main(string[] args)
 {
     var scenario = new Scenario(); // preparing the scenario
     var sim = new Simulator(scenario, seed: 0); // construct the simulator
     sim.Run(10000); // run simulator
     // sim.Status... // read analytics from status class
 }
示例#2
0
        internal Random RS { get; private set; } // use multiple random streams if necessary

        public Simulator(Scenario scenario, int seed)
        {
            Scenario = scenario;
            Status = new Status(this);
            RS = new Random(seed);

            // schedule the initial event
            // ScheduleEvent(new MyEvent1(this, new Load_1()), TimeSpan.FromHours(some_random_value));
        }