public TrafficReferral(ConcurrentBag<Customer> customers, Catalog catalog)
 {
     if (customers == null) throw new ArgumentNullException("customers");
     if (catalog == null) throw new ArgumentNullException("catalog");
     _customers = customers;
     _catalog = catalog;
     _ai = new ActiveAgent(1000, NewVisit, EndVisit);
 }
예제 #2
0
 public TrafficReferral(ConcurrentBag <Customer> customers, Catalog catalog)
 {
     if (customers == null)
     {
         throw new ArgumentNullException("customers");
     }
     if (catalog == null)
     {
         throw new ArgumentNullException("catalog");
     }
     _customers = customers;
     _catalog   = catalog;
     _ai        = new ActiveAgent(1000, NewVisit, EndVisit);
 }
 public void Simulate()
 {
     Console.WriteLine("Simulation");
     // Find who's turn
     WhosTurn();
     Console.WriteLine("Chosen Agent is " + ActiveAgentID);
     // Make them play
     ActiveAgent.Interact(this);
     ActiveAgent.ObserveMyMove(_sig);
     // Update environment
     foreach (Agent agent in _agents)
     {
         // Make others see
         if (agent.ID != ActiveAgentID)
         {
             agent.Observe(this);
         }
     }
 }
예제 #4
0
 public Administrator(Catalog catalog)
 {
     _catalog = catalog;
     _ai      = new ActiveAgent(100000, ViewCatalog, ChangePrice);
     _name    = Fake.String("Administrator");
 }
예제 #5
0
 public Customer(Catalog catalog)
 {
     _catalog = catalog;
     _ai = CreateProfile();
     _name = Fake.Name();
 }
예제 #6
0
 public Administrator(Catalog catalog)
 {
     _catalog = catalog;
     _ai = new ActiveAgent(100000, ViewCatalog, ChangePrice);
     _name = Fake.String("Administrator");
 }
예제 #7
0
 public Customer(Catalog catalog)
 {
     _catalog = catalog;
     _ai      = CreateProfile();
     _name    = Fake.Name();
 }