Skip to content

gds_business.supplychain.elements

Supply chain element declarations — frozen Pydantic models.

Bases: BaseModel

A warehouse, factory, or distribution center node.

Maps to: GDS Mechanism (state update f) + Entity (inventory state X).

Source code in packages/gds-business/gds_business/supplychain/elements.py
class SupplyNode(BaseModel, frozen=True):
    """A warehouse, factory, or distribution center node.

    Maps to: GDS Mechanism (state update f) + Entity (inventory state X).
    """

    name: str
    initial_inventory: float = 0.0
    capacity: float = Field(default=float("inf"), description="Max inventory capacity")
    description: str = ""

Bases: BaseModel

A directed flow link between supply nodes.

Maps to: GDS Wiring.

Source code in packages/gds-business/gds_business/supplychain/elements.py
class Shipment(BaseModel, frozen=True):
    """A directed flow link between supply nodes.

    Maps to: GDS Wiring.
    """

    name: str
    source: str
    target: str
    lead_time: float = 1.0

Bases: BaseModel

An exogenous demand signal entering the network.

Maps to: GDS BoundaryAction (exogenous input U).

Source code in packages/gds-business/gds_business/supplychain/elements.py
class DemandSource(BaseModel, frozen=True):
    """An exogenous demand signal entering the network.

    Maps to: GDS BoundaryAction (exogenous input U).
    """

    name: str
    target: str
    description: str = ""

Bases: BaseModel

A reorder decision logic node.

Maps to: GDS Policy (decision logic g). Observes inventory and demand signals, emits order decisions.

Source code in packages/gds-business/gds_business/supplychain/elements.py
class OrderPolicy(BaseModel, frozen=True):
    """A reorder decision logic node.

    Maps to: GDS Policy (decision logic g).
    Observes inventory and demand signals, emits order decisions.
    """

    name: str
    node: str
    inputs: list[str] = Field(
        default_factory=list,
        description="Names of nodes whose inventory this policy observes",
    )