Пример #1
0
  public void CallScenarioB(CityPanel c) {
    //	All workplaces fully employed.
    //	Day starts and all workers go to work.
    //	Three not-working persons eat at home, then visit all the workplaces in different orders.
    //	[one should walk; one should take a car; one should take a bus.]

    workShift();
    setDanielRestClosed(c);
    oneBuildEmployed(c);

    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);
  }
Пример #2
0
  public void CallScenarioA(CityPanel c) { // for points 1-4
    // 	A:
    //	All workplaces (markets, all restaurants, banks) fully employed.
    //	Day starts and all workers go to work.
    //	One not-working person eats at home, then visits all the workplaces by walking.
    //	Roads should have appropriate complexity [e.g. intersections with stop signs and/or signals]

    workShift();
    setDanielRestClosed(c);
    oneBuildEmployed(c);
    PersonAgent p = new PersonAgent("Scen A", "None", "Wealthy");
    p.addItem("Juice", 0, 2, 2);
    c.addPerson(p);
    p.setHungry();
    p.setBus(false);
  }
Пример #3
0
  public void CallScenarioJ(CityPanel c) {
    //	Fully employed workplaces [enough people to fill all the workplace roles].
    //	Fully populated city [enough people to be wandering around doing interesting things]. At
    // least 50 people.
    //	All restaurants integrated.
    //	At least 2 instances of other workspaces (your decision as to how many more you want).
    //	People make decisions to eat at home.
    //	People make decisions to eat at particular restaurants.
    //	Enough vehicle traffic to show stopping/starting at intersections.
    //	Vehicles stop for pedestrians with right of way.

    workShift();
    setDanielRestClosed(c);
    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");
    PersonAgent p5 = new PersonAgent("Robber", "Crook", "Average");
    PersonAgent p6 = new PersonAgent("Chris", "None", "Wealthy");
    PersonAgent p7 = new PersonAgent("No Job 6", "None", "Poor");

    p5.setHungry();
    p4.setHungry();

    c.addPerson(p2);
    c.addPerson(p3);
    c.addPerson(p4);
    c.addPerson(p5);
    c.addPerson(p6);
    c.addPerson(p7);

    PersonAgent p998 = new PersonAgent("No Job 1", "None", "Wealthy");
    PersonAgent p999 = new PersonAgent("No Job 2", "None", "Poor");
    PersonAgent p99 = new PersonAgent("No Job 3", "None", "Average");
    PersonAgent p995 = new PersonAgent("Robber", "Crook", "Average");
    PersonAgent p996 = new PersonAgent("Chris", "None", "Wealthy");
    PersonAgent p997 = new PersonAgent("No Job 6", "None", "Poor");
    p995.GiveCar();
    p996.GiveCar();
    p999.GiveCar();
    p999.setHungry();
    p99.setHungry();

    c.addPerson(p998);
    c.addPerson(p999);
    c.addPerson(p99);
    c.addPerson(p995);
    c.addPerson(p996);
    c.addPerson(p997);

    PersonAgent p = new PersonAgent("Norman", "None", "Wealthy");
    p.GiveCar();
    p.addItem("Juice", 0, 2, 2);
    c.addPerson(p);

    PersonAgent p8 = new PersonAgent("Aleena", "None", "Average");
    c.addPerson(p8);

    PersonAgent p9 = new PersonAgent("Daniel", "None", "Wealthy");
    p9.GiveCar();
    p9.setHungry();
    c.addPerson(p9);
  }