SupplyNetPy API Reference

SupplyNetPy includes a sub-module called Components, which facilitates the creation of supply chain networks by providing essential components such as nodes, links, and demand, and assembling them into a network. The Components module contains four sub-modules: core, inventory, logger, and utilities.

The core module is responsible for creating supply chain components. It includes classes such as RawMaterial, Product, Inventory, Node, Link, Supplier, Manufacturer, InventoryNode, and Demand. Any new node created using these classes will be instantiated within a SimPy environment. The Inventory class is responsible for monitoring inventories. By default, the classes in the core module support single-product inventories. The Inventory class extends the SimPy Container class to implement the basic behavior of an inventory, including routines to record inventory level changes. If users wish to create a different inventory type with custom behavior, they can do so by extending either Inventory or SimPy Container.

The logger module is designed to maintain simulation logs. It includes the GlobalLogger class, which serves as a common logger for all components within the environment. Users can configure this logger to save logs to a specific file or print them to the console.

The utilities module provides useful Python routines to reduce manual work. It contains functions for creating random supply chains, generating multiple nodes or links, and more. Additionally, it offers routines for supply chain network visualization.

SupplyNetPy Library Hierarchy

SupplyNetPy
├── Components
│   ├── core.py
│   ├── logger.py
│   ├── utilities.py