production#
Production events for wage payments, production execution, and contract management.
This module defines the production phase events that execute after credit market events. Firms pay wages, workers receive income, firms produce goods using labor, and employment contracts are updated (decrementing periods remaining).
Event Sequence#
The production events execute in this order:
FirmsPayWages - Firms deduct wage bill from available funds
WorkersReceiveWage - Workers add wages to income
FirmsRunProduction - Firms produce goods using labor
WorkersUpdateContracts - Decrement contract duration, handle expiration
Note: FirmsCalcBreakevenPrice and FirmsAdjustPrice are activated via
pricing_phase='production' config. The default pipeline uses planning-phase
pricing (FirmsPlanBreakevenPrice/FirmsPlanPrice in planning.py).
Design Notes#
Events operate on producer, employer, worker, and consumer roles
Production function: Y = φ × L (output = productivity × labor)
Contract expiration: periods_left decremented each period, expires at 0
Firms with zero labor produce zero output (marked for bankruptcy)
Wage payments reduce firm funds but increase worker income (money transfer)
Examples
Execute production events:
>>> import bamengine as be
>>> sim = be.Simulation.init(n_firms=100, n_households=500, seed=42)
>>> # Production events run as part of default pipeline
>>> sim.step()
Execute individual production event:
>>> event = sim.get_event("firms_run_production")
>>> event.execute(sim)
>>> sim.prod.production.mean()
52.5
Check production output:
>>> sim.prod.inventory.sum()
5250.0
See also
bamengine.events._internal.productionSystem function implementations
ProducerProduction state
EmployerLabor force state
WorkerEmployment state
ConsumerIncome state
Event Classes#
Firms pay wages by deducting wage bill from available funds. |
|
Workers receive wage income from employment. |
|
Firms produce goods using labor and add output to inventory. |
|
Decrement contract duration and handle expiration for employed workers. |