An extension of the supply chain model that allows distributors to choose which manufacturer they want to order from based on distance. Distributors then dispatch trucks to deliver goods.
Coordinate data for model initialization is contained in the globals.json
file.
Agents
There are three types of agents present in this model: manufacturers, client cities, and trucks.
Manufacturers generate stock at a constant rate. When a client city messages them with a request to restock, they generate a truck which delivers stock to the client.
Clients experince demand at distributed intervals of time. They order from their closest manufacturers in order to meet this demand. They keep track of the time it takes for order to be fulfilled.
Trucks navigate along real roads by using the Mapbox message handler (enabled in globals.json
) and making Navigation API calls (see truck.js
). Once a truck has reached its destination it will deliver the stock it was carrying and then return to the manufacturer which dispatched it.
Experiments
Each manufacturer serves a different amount of client cities, at different average distances. By adjusting the number of trucks each manufacturer can dispatch, we can determine the minimum amount needed to satisfy a minimum acceptable fulfillment time. you can manually adjust the sliders in globals.json, or you could run an Experiment.
Running any of the Sweep Experiments will allow you to easily see the effects of parameter changes: the number of trucks each manufacturer can dispatch. Running the Multi experiment will allow you to create a full factorial sweep that can show interaction effects among the individual parameter sweeps.
This simulation utilizes HASH's in-built geospatial viewer and ability to retrieve directions from Mapbox. You can read more about these features in the docs: