Discord
@hash/gas-station-refueling
Simulation
1
1
Public

Gas Station Refueling

A model of a gas station. Cars enter and fuel up at gas pumps. When the gas stations' storage tanks are low, a fuel truck drives in and restocks them.

This is a model of a gas station with 4 pumps and 3 different fuel types. Cars enter the gas station and top up, while fuel trucks enter and refuel the gas storage tanks.

All vehicles (cars and trucks) use the "follow_road.js" pathfinding behavior, which keeps them moving along the road segments.

Cars enter the simulation randomly and attempt to find a free pump, but if there are none available they will wait in line behind another car. Topping up and refueling take a certain amount of time, the car or fuel truck will depart the simulation along the roads.

Trucks carry only one type of fuel, and will refuel the corresponding fuel tank. A refueling truck will be requested by the tank whenever its fuel level drops below a certain amount.