-
Notifications
You must be signed in to change notification settings - Fork 1
Package Overview
Sarah Wise edited this page Aug 28, 2019
·
2 revisions
The model framework consists of three distinct packages:
-
objects
- the base entities (agents) which have behaviours. This includes Drivers, Parcels, Vehicles, and Depots. -
sim
- the structure which puts the entities into an environment and schedules them to interact with one another. -
utilities
- utility code, including parameter sampling tools and static functions which facilitate the partitioning of Parcels into different groups by location or the setup of Drivers at different locations.
Each of these are extended upon below.
The kinds of agents, complete with methods and attributes.
-
Burdenable.java
- an interface which identifies which kinds of agents can carry Parcels. -
Depot.java
- the point at which Parcels enter the environment. Depots use a utility function to partition their parcels into a variety of rounds for Drivers to complete. The Depot controls the distribution of Parcels to the Drivers, only allowing a set number of Drivers to take on loads at the same time. -
Driver.java
- the Driver agent is the entity which takes on the parcels associated with a particular round, plans a route to deliver them, and attempts to carry out that route. Drivers have knowledge of the local road network, in particular the location of freight-accessible parking spaces. An important note: despite the name, Drivers do not necessarily need to be equipped with a vehicle and may indeed be on foot. If they are equipped with a Vehicle, their attribute myVehicle will be non-null. -
Parcel.java
- the core of the model, Parcels are entities with a specific delivery location as well as weight and dimensions which can be used in the round partitioning portion of the code. -
Vehicle.java
- Vehicles are intended to act as a superclass for the various kinds of modes of transportation available to delivery personnel. In future versions of this, there will be subclasses allowing for distinction between vans, cargo cycles, and potentially even barges.
The sim
package defines the environment within which the agents interact. The three files included here are as follow:
-
BulkRun.java
- a piece of code which facilitates running the model multiple times in "headless" mode, that is, without a visualisation. -
SimpleDrivers.java
- the code simulation structure. TheSimpleDrivers
object defines the physical environment (include loading depot locations, building geometries, the road network, and parking locations). It also controls either the generation of a random sampling of Parcel delivery locations or else loads the location of user-assigned deliveries/manifests. Finally, it initialises agents at the defined locations and schedules them to start behaving. -
SimpleDriversWithUI.java
- a wrapper around SimpleDrivers which visualises the simulation.
Some helpful utility functions to help model exploration and to offload static functions out of the agents and clean up the code.
-
DepotUtilities.java
- functions to help the Depots break their set of Parcels up into different rounds. -
DriverUtilities.java
- functions to setup Drivers in different ways, as well as an enumerated list of possible activities they can have. -
ParameterSamplingSpace.java
- a wrapper for a Latin Hypercube object taken from the SSJ Library. -
SamplingParameter.java
- a helper object forParameterSamplingSpace
.