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:

  1. FirmsPayWages - Firms deduct wage bill from available funds

  2. WorkersReceiveWage - Workers add wages to income

  3. FirmsRunProduction - Firms produce goods using labor

  4. 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.production

System function implementations

Producer

Production state

Employer

Labor force state

Worker

Employment state

Consumer

Income state

Event Classes#

FirmsPayWages

Firms pay wages by deducting wage bill from available funds.

WorkersReceiveWage

Workers receive wage income from employment.

FirmsRunProduction

Firms produce goods using labor and add output to inventory.

WorkersUpdateContracts

Decrement contract duration and handle expiration for employed workers.