Esempio n. 1
0
  public void CallScenarioR(CityPanel c) {
    //	Weekend behavior is different
    //	Some workplaces are closed on the weekend.
    //	Show that people naturally avoid them and seek alternatives.

    // starts on sat:
    TimeManager.getInstance().setDivider(2);
    TimeManager.getInstance().setDayOffset(5);
    TimeManager.getInstance().setOffset(50000);

    // starts on fri:
    //	TimeManager.getInstance().setDivider(1);
    //	TimeManager.getInstance().setOffset(50000);
    //	TimeManager.getInstance().setDayOffset(4);

    fillWork(c);

    PersonAgent p2 = new PersonAgent("No Job 1", "None", "Wealthy");
    PersonAgent p3 = new PersonAgent("No Job 2", "None", "Poor");
    PersonAgent p4 = new PersonAgent("No Job 3", "None", "Average");

    c.addPerson(p2);
    c.addPerson(p3);
    c.addPerson(p4);
  }
Esempio n. 2
0
  //	public void fillWork(CityPanel c){
  //		c.addWorker("Bank Host", "Bank Host", "Average");
  //		c.addWorker("Teller 1", "Teller", "Average");
  //		c.addWorker("Teller 2", "Teller", "Average");
  //		c.addWorker("Teller 3", "Teller", "Average");
  //
  //		c.addWorker("Bank Host", "Bank Host", "Average");
  //		c.addWorker("Teller 1", "Teller", "Average");
  //		c.addWorker("Teller 2", "Teller", "Average");
  //		c.addWorker("Teller 3", "Teller", "Average");
  //
  //		//for restaurant: need to repeat for all restaurants
  //		c.addWorker("Chef", "Cook", "Average");
  //		c.addWorker("Waiter 1", "Waiter", "Average");
  //		c.addWorker("Waiter 2", "Waiter", "Average");
  //		c.addWorker("Cashier", "Cashier", "Average");
  //		c.addWorker("Restaurant Host", "Restaurant Host", "Average");
  //	}
  //
  //
  //	public void CallScenarioA(CityPanel c){				// for points 1-4
  //
  //		fillWork(c);
  //		TimeManager.getInstance().setDivider(20);
  //		TimeManager.getInstance().setOffset(300000);
  //		PersonAgent p = new PersonAgent("Scen A", "None", "Wealthy");
  //		c.addPerson(p);
  //
  //		p.setHungry();
  //		p.setBus(false);
  //	}
  //
  //	public void CallScenarioB(CityPanel c){
  //
  //		fillWork(c);
  //		TimeManager.getInstance().setDivider(20);
  //		TimeManager.getInstance().setOffset(300000);
  //
  //		PersonAgent p = new PersonAgent("Driver", "None", "Wealthy");
  //		p.GiveCar();
  //		p.addItem("Juice", 0, 2, 2);
  //		p.setBus(false);
  //		c.addPerson(p);
  //
  //		PersonAgent p2 = new PersonAgent("Busser", "None", "Average");
  //		p2.setBus(true);
  //		c.addPerson(p2);
  //
  //		PersonAgent p3 = new PersonAgent("Walker", "None", "Poor");
  //		p3.setBus(false);
  //		p3.setHungry();
  //		c.addPerson(p3);
  //
  //	}
  public void CallScenarioP(CityPanel c) {
    c.addWorker("Bank Host", "Bank Host", "Wealthy");
    c.addWorker("Teller 1", "Teller", "Poor");
    c.addWorker("Teller 2", "Teller", "Poor");
    c.addWorker("Teller 3", "Teller", "Average");

    c.addWorker("Bank Host", "Bank Host", "Average");
    c.addWorker("Teller 1", "Teller", "Average");
    c.addWorker("Teller 2", "Teller", "Wealthy");
    c.addWorker("Teller 3", "Teller", "Poor");

    // for restaurant: need to repeat for all restaurants
    c.addWorker("Chef", "Cook", "Average");
    c.addWorker("Waiter 1", "Waiter", "Average");
    c.addWorker("Waiter 2", "Waiter", "Average");
    c.addWorker("Cashier", "Cashier", "Average");
    c.addWorker("Restaurant Host", "Restaurant Host", "Wealthy");

    TimeManager.getInstance().setDivider(30);
    TimeManager.getInstance().setOffset(70420000);

    PersonAgent p2 = new PersonAgent("No Job 1", "None", "Wealthy");
    PersonAgent p3 = new PersonAgent("No Job 2", "None", "Poor");
    PersonAgent p4 = new PersonAgent("No Job 3", "None", "Average");

    c.addPerson(p2);
    c.addPerson(p3);
    c.addPerson(p4);
  }
Esempio n. 3
0
 public void workShift() {
   TimeManager.getInstance().setDivider(20);
   TimeManager.getInstance().setOffset(300000);
 }