Resources
Currency, fuel, cargo, berths, clearances and assignments — modelled as declared resources and settled atomically.
What counts as a resource
Anything finite that an action spends or claims. The obvious cases are currency, fuel, power and stock. The more useful cases are the ones people usually model as locks: a berth, a runway clearance, a repair bay, a delivery assignment.
Budgets
A role allocates budgets. A crane operator might hold 240 units of power per minute; a courier might hold a cargo capacity. Budgets are part of the authority envelope, which means exceeding one is a validation failure rather than a runtime surprise.
Transactions
The ledger reserves the full cost of a plan before anything actuates, and settles it as one transaction. There are exactly two outcomes: the whole plan is paid for and runs, or nothing is spent and the plan is discarded.
Intermediate state is never observable — not to players, and not to other actors deciding in the same tick. This is what stops two vessels reserving the same berth under concurrent arrivals.
Exclusivity as a resource
Modelling exclusive access as a resource rather than a lock has a practical advantage: the ledger already guarantees single ownership and atomic transfer, so contention resolves in one place instead of in every actor’s planner.
- A berth with capacity 1 is a berth that can only be reserved by one vessel.
- A runway clearance that cannot be co-held is separation, enforced by the ledger.
- A dispatch assignment with a single owner is contention resolved before it becomes a race.
Reconciliation
Because every movement is a ledger entry, totals are checkable. A scenario test that runs a harbour for a thousand ticks can assert that cargo balances exactly, that forage never goes negative, and that work-in-progress on a factory line is conserved. See Testing.