Planning the Build


Let’s apply this mental model to the Oil Supply Chain model.

We start by cataloguing the agents. In AnyLogic you can double click on any of the agents to see the relevant functions, properties, state charts, etc.

Agents

FuelTruck

Purpose
Properties
Behaviors

Fuel Trucks transport oil from refineries and storage agents to retailer agents.

Refinery

Purpose
Properties
Behaviors

Refinery Agents take unprocessed oil and refine it into oil that can be delivered to storage units / retailers

Retailer

Purpose
Properties
Behaviors

Retailers represent customer demand for oil and request and receive oil from fuel agents.

Storage

Purpose
Properties
Behaviors

Storage agents hold unrefined and refined oil.

In the AnyLogic model there are three different types of storage locations: ports, storages, and distributors

  • Ports have to be able to unload oil from Tanker agents
  • Storages need to be able to accept the flow of oil in and out
  • Distributors need to be able to send trucks to refuel retailers

All of these share lots of features, so we’ll be able to make use of HASH’s composable behaviors to define our agents.

Tanker

Purpose
Properties
Behaviors

Tankers deliver oil from ‘outside the sim’ (they actually generate it) to storage units

If you’ve been following along you’ll notice we left off one agent - Pipelines. Pipelines act as a flow regulator, decreasing quantity in one agent and delivering it to another. In our simulation we're going to use messages to accomplish a similar thing. Messaging is a key primitive operation provided by HASH, and as you’ll see we use it throughout the simulation.

Since we can represent the behavior of Pipelines completely through messages, we'll effectively combine it with the Storage agents to reduce the number of agents in the simulation, and the complexity of interactions. But more on that later.

Previous

Join our community of HASH developers