By Steve Goschnick
Deptartment of Computer Science and Software Engineering
University of Melbourne.
Date: 1999/05/14
Subject: 433-682 Intelligent Software Agents
Assignment: 2
The Assignment (set by Professor Leon Sterling):
"Develop a set of agents to model traffic in a large cuty such as Melbourne. Your agents should include some modes of transport such as cars and buses, people, traffic regulators such as policeman and traffic lights, emergency vehicles such as fire engines and ambulances.
You should have at least eight types of agents. For each agent, you should sketch the beliefs it might have, plans it might have, and events that might trigger plans being called.
You need to submit a description of the agents, their beliefs, goals and plans.
Discussion of your deliberations in designing the agents would be helpful."
The first step needed is a Requirements Analysis, based upon a very broad single client requirement, namely to: 'Develop a set of agents to model traffic in a large city such as Melbourne'. I am assuming the whole city of Melbourne, not just the CBD, via the word 'large'.
Before modeling can begin, a collection of domain specific information, needs to be gathered as fodder for the extraction of potential entities (as candidates for: agents classes, and objects), their attributes and behaviours.
The Journey:
It is worth noting early on, that the reason for traffic is the journey, and all journeys have some common attributes:
Journey: | The main attributes of a journey are: start; destination; purpose (work; shopping; visiting; servicing; emergency, etc); route. |
Journey-route: | The particular route that a vehicle takes to get from the start to the destination of a Journey. This is usually a sequence of links in the road network, but it can also include bus routes or train routes, when modes of transport other than the car, are included - as in most cities. |
Traffic: | - is the summation of a whole lot of individual journeys. |
The information outlined below will initially be unstructured, however it will be divided into two areas, even at this early stage of analysis: information related to Environment; and information related to possible Agents. Even though the assigned task is to develop the agents, the environment very much needs to be taken into consideration, to tease-out the various roles, responsibilities, expertise, capabilities, services, interactions, protocols, beliefs, goals and plans, of the agents needed.
Little attempt is being made to put things into preconceived structures, at this preliminary stage. This is primarily an excise in collecting a sufficiently wide set of artefacts to achieve a plausible model.
Environment:
Road Link: The section of road between intersections. Each direction has a maximum capacity, a maximum advised speed, a number of lanes in one or two directions.
Lanes: The number of lanes in a road link, a separate count in each direction (nb. some roads change the direction of the central lane/s on a fixed-time basis, to cope with AM and PM peaks, using overhead illuminated lane markers)
Intersections: Three main categories of intersection are: traffic-light controlled; roundabouts; signed (stop-sign/giveway sign; right of way).
Link classifications: In traffic engineering terms, there are 5 main categories of road network links: local street (eg. residential area); collector road (more significant roads through local areas, leading from local streets and cul-de-sacs to sub-arterial and arterial roads); sub-arterial road (two lanes in either direction, controlled intersections); arterial road (two or more lanes in each direction, service lanes to enable relatively unimpeded driveway access), bus stops off the side of the road, divided carriage-way; freeway (overpasses instead of intersections).
Home (driveway): The start of most journeys - spread alone most of the road network links, particularly along local streets and collector roads, and alone the service lanes of arterial roads, but not freeways.
Workplace: Attracts a known number of journeys-to-work.
ShoppingCentre: Where one buys things (goods and services).
Firestation: Home-base of fire trucks.
Ambulance Station: Home-base of ambulance vehicles.
Police Station: Home base of police vehicles.
Hospital: Destination for ambulance in an emergence, after picking up patient.
Zones: A geographic area containing a number of homes, places-of-work, shops, etc. Note: In an aggregated model of an environment, a zone might be treated as a single.point, connected to the transport network, in a number of places (eg. connected to surrounding roads - see Fig. 1 below), with journeys distributed amongst those connected links. A zone can be both a sink (destination) and a source of various journeys.
Parking-lot: Off-street parking area, accessed along links. Has a known number of parking spots, and a known cost per time period.
Parking spot: On-street parking, along sections of links.
Parking times: Duration; certain time periods which affect parking duration including exclusion times (eg. clearway) - to provide another lane.
Rail line: For fixed track vehicle (trains). Known stops. Known timetable. Known duration of journey.
Tram line: For light-weight fixed track vehicle (often shares a lane with cars). Known stops to pickup and put down passengers.
Stations: A fixed location to catch a train. People often walk or drive or catch a bus or tram to or from a station, in what constitutes a multi-modal journey.
Tramstop: Fixed locations to catch a tram.
Stalled vehicle/accident: A stalled vehicle on the roadway, or one or more in an accident, becomes a part of the environment, which others need to negotiate around, and which can have a significant reaction upon traffic flows.
Roadworks: Roadworks are another situation which, like a stalled or damaged vehicle, are out of the ordinary and which other vehicles must negotiate.
Weather: Wet weather will affect driver speeds and hence the maximum capacities of a given road link. Other weather conditions affect traffic:sun-glare, fog; driving rain and wind; etc.
Agents - listing of Potential candidates for the model:
Intersection Controller: Main role is to maximize the through-put of vehicles in all directions. Conventional controllers have a number of plans, for different times of the day (more on this later). Inputs to intersections include transducers in the road (a loop of wire embedded in asphalt), which detect a vehicle passing over, so they can perceive gaps in traffic, as well as good estimates of current flow.
Arterial Section: To achieve a better flow of traffic (the so called 'green wave') - which in turn reduces: fuel consumption; journey time; frustration; the need for freeways - a number of consecutive intersection controllers, can be linked and run according to a group plan.
Emergence Vehicle Dispatcher: Receives calls for urgent assistance, locates available emergency vehicles; then assigns one optimally, time wise.
Transport Mode Selector: These use models that use Utility and other theories, to optimise/synthesise the choice of transport mode (train, bus, tram, car, walk, multi-modal). Obviously, most people don't change modes of transport very often, unless some event prompts them to consider the alternatives. For example: steep escalation in fuel costs; loss of license; gain of a license; toll roads introduced; new major destinations - some of these events are the driving force for traffic engineers to build models in the first place.
Route Selection: While most vehicle drivers don't change modes of transport very often, many do change route often, influenced by such things as: time-of-day; weather; radio traffic reports; perceived blockages ahead.
Car: The predominant vehicle used to make a journey in a city such as Melbourne.
Truck: Large dimension, slower acceleration and braking speeds, means that trucks affect traffic in different ways than cars.
Motorbike: Are very flexible with regard to straying from traffic lanes, and they have significantly greater accelerations than most other vehicles, requiring other drivers to be more cautious in their movements, such as changing lanes.
Civilian Driver: Need to be alert at all times reacting to situations as they arrive. Need to negotiate the vehicle safely at all times. Need to signal intentions to other drivers. Ability to select a parking spot.
Emergency Driver: Highly reactive individual, for whom many of the rules and protocols of the road, don't apply.
Policeman: A driver of a police car, or a pedestrian who can control an intersection.
Train: Follows fixed tracks. Only planned stops are at stations. Sticks to a timetable.
Tram: Tries to stick to a timetable.
Home: Generates journeys.
Commuter: Uses train, tram or bus within journey.
Pedestrian: Travels all or part of their journey on foot.
Workplace: Generates journeys.
Major Events: Generates large numbers of out-of-the ordinary journeys.
Out of Scope:
The modeling of the environment is not within the scope of this assignment. However, I will assume the existence of a complex model of the environment: a computerized version of the transport network, complete with: multiple lanes; parking spots; parking lots; train lines; tram lines; train signal crossings; bus stops; train stations; home sites, places of work and shops - all statistically distributed about the network approximating the actual city being modeled - within which the agents can interact, to model traffic - the summation of all their individual journeys.
The assumed level of model of sources and destinations of Journeys, within model of environment:
The modeling of a city, could be done at several levels, consider the following two options:
1. The individual buildings (homes, flats, work premises, shops) usually placed along road-links, can be modeled with driveways and parking lots, representing the physical location of the start and end of journeys, from the traffics point of view.
2. Zones can be used to aggregate many details, effectively becoming sources and sinks, for journeys. Zones are compatible with geographic areas about which various organisations within society, gather and aggregate statistical data. Eg. LGAs - Local Government Areas; Postal Code area; etc. The sort of data aggregated at a zone includes: number of journey-to-work trips generated; number of shopping trips generated; number of emergence calls generated; number of workplaces within; number of off-street parking spaces within; etc.
While the level of modeling of the city is an environment modeling concern - which I have deemed as 'out of scope' - the level of modeling of the environment, is pertinent to some of the agents to be modeling. Therefore, I do need to select which level of the environment, that I will assume is modeled elsewhere.
Fig.1 - Aggregated Zone connected to road network model - not used herein.
Aggregating the data from areas within a transport network model, to zones represented as points, is well understood and quite achievable in pre-agent simulation technologies. Agents have particular strengths when it comes to modeling individual units (autonomous, internally motivated) with know plans and able to select between them, reacting in an uncertain environment, with many possible ways to achieve objectives. For this reason I'm going to assume option 1 above for modeling a city: down to the level of individual buildings: ie. driveway, parking spots and parking lots - along the road links, within the network. Road link types will include all types: local streets; collector roads; sub-arterials; arterials; and freeways.
Fig.2 - the Assumed Discrete Model.
This level of modeling of the environment will also include the number of lanes in each direction on any given link in the road network. The will allow for interesting modeling of car-driver agents that: change lane, and stop and start in a manner similar to human drivers, giving a level of high fidelity in modeling traffic, above what an aggregated zone model could hope to achieve.
The methodology used here for agent analysis is one outlined in:
David Kinny, Michael Georgeff and Anand Rao (1996). A Methodology and Modelling Technique for Systems of BDI Agents.
It involves identifying and spelling out, the following Common Analysis Concepts, about the individual candidate Agents:1. Intersection Controller |
2. Arterial Section Controller |
3. Car Driver |
4. Car |
5. Truck Driver |
6. Truck |
7. Route Selector |
8. Emergency Vehicle Driver / Emergency Vehicle |
9. Emergence Vehicle Dispatcher |
10. Household |
11. Workplace |
12. End of Link Simulator |
13. Commuter |
14. Train Driver / Train (from a traffic modeling view, I'll combine driver and vehicle) |
15. Tram Driver / Tram (ditto) |
16. Bus Driver / Bus |
To simplify the model a little, the roles Car Driver, Car, Truck Driver and Truck, are folded into a single generic role: Driven Vehicle. Note: I've already combined: Police; Ambulance and Fire engine, into generic Emergency Vehicle. I'll combine that driver and vehicle into Emergency Driven Vehicle. The same goes for Bus Agent.
Agent |
Responsibilities |
1. Intersection Controller Agent |
|
2. Arterial Section Controller Agent |
|
3. Driven Vehicle Agent |
|
4. Route Selection Agent |
|
5. Emergency Driven Vehicle Agent |
|
6. Emergence Vehicle Dispatcher |
|
7. Household Agent |
|
8. Workplace Agent |
|
9. End of Link Simulator Agent |
|
10. Commuter |
|
11. Train Agent |
|
12. Tram Agent |
|
13. Bus Agent |
|
Agent |
Expertise (Knowledge about behaviour) |
1. Intersection Controller Agent |
|
2. Arterial Section Controller Agent |
|
3. Driven Vehicle Agent |
|
4. Route Selection Agent |
|
5. Emergency Driven Vehicle Agent |
|
6. Emergence Vehicle Dispatcher |
|
7. Household Agent |
|
8. Workplace Agent |
|
9. End of Link Simulator Agent |
|
10. Commuter Agent |
|
11. Train Agent |
|
12. Tram Agent |
|
13. Bus Agent |
|
Agent |
Capabilities, Permissions, Resources |
1. Intersection Controller Agent |
|
2. Arterial Section Controller Agent |
|
3. Driven Vehicle Agent |
|
4. Route Selection Agent |
|
5. Emergency Driven Vehicle Agent |
|
6. Emergence Vehicle Dispatcher Agent |
|
7. Household Agent |
|
8. Workplace Agent |
|
9. End of Link Simulator Agent |
|
10. Commuter |
|
11. Train Agent |
|
12. Tram Agent |
|
13. Bus Agent |
|
Agent |
Services, Interactions, Protocols |
1. Intersection Controller Agent |
|
2. Arterial Section Controller Agent |
|
3. Driven Vehicle Agent |
|
4. Route Selection Agent |
|
5. Emergency Driven Vehicle Agent |
|
6. Emergence Vehicle Dispatcher Agent |
|
7. Household Agent |
|
8. Workplace Agent |
|
9. End of Link Simulator Agent |
|
10. Commuter |
|
11. Train Agent |
|
12. Tram Agent |
|
13. Bus Agent |
|
Recall that Intentions (also knowns as Tasks), are those Goals an agent is committed to achieve. An Agent selects a Plan to enact a Task.
The column in the table below headed 'Beliefs and Knowledge', also includes knowledge about behaviour, which is restated here, from the above table on 'Expertise'. Note: The difference between Knowledge and Beliefs: the first are facts known to the agent, while the second are used by the Agent in the absense of fact where there is incomplete information.
Name: 1. Intersection Controller Agent | ||
Description: Controls all that passes through a single intersection via red, green and amber lights, including through traffic, left and right turning traffic via arrows, and pedestrian's via walk and don't walk lights. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 2. Arterial Section Controller Agent | ||
Description: To achieve better flow of traffic along a section of road (a so called 'green wave'), a number of consecutive intersection controllers can be linked in a group plan. This agent overrides the plans of the individual Intersection Controller Agent’s autonomy (and plans). | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 3. Driven Vehicle Agent | ||
Description: Represents a vehicle plus the driver within the vehicle working as one, from the point of view of modeling traffic. It can represent a car or a truck, by varying size, speed and acceleration parameters. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 4. Route Selection Agent | ||
Description: An optimising agent which determines the best route for a journey given the origin and destination of that journey. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 5. Emergency Driven Vehicle Agent | ||
Description: To service calls for assistance as dispatched by the Emergency Vehicle Dispatcher Agent. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 6. Emergence Vehicle Dispatcher Agent | ||
Description: Takes calls from all agents calling for emergency assistance, then dispatches an Emergency Vehicle Agent to the appropriate destination. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 7. Household Agent | ||
Description: Represents a household with a location in the environment model. It is the generator of most journeys that add up to traffic. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 8. Workplace Agent | ||
Description: Represents a workplace with a location in the environment model. It is the generator of many journeys that add up to traffic. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 9. End of Link Simulator Agent | ||
Description: Simulates Driven Vehicle Agents and Commuter Agents and their journeys, that come from outside the modeled city. Also acts as the singular destination for multiple destinations beyond the boundary of the modeled city. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 10. Commuter | ||
Description: This represents a person who takes some form of public transport to work, be it train, tram or bus. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 11. Train Agent | ||
Description: Represents a train able to carry Commuter Agents. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 12. Tram Agent | ||
Description: Represents a tram, able to carry Commuter Agents. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Name: 13. Bus Agent | ||
Description: Represents a Bus able to carry Commuter Agents. | ||
Beliefs and Knowledge
|
Goals
|
Plans
|
|
|
|
Copyright 1999, Steve Goschnick. All rights reserved.