Skip to content

API reference

Every public class and function, generated from the docstrings in the source code. For explanations and worked examples, start from the Guide; come here for exact signatures, parameters, and return values.

Where things live

Import each name from its home module:

Module Contents
stockcast.core state, orders, the engine, schedules, constraints, callbacks, suppliers, processes
stockcast.policies built-in policies and the reorder-point target provider
stockcast.evaluation the evaluator, event table validation, metrics
stockcast.utils demand generation and manual-loop primitives
stockcast.visualization plots

The most common names are also re-exported from the top-level stockcast package, and stockcast.__version__ gives the installed version.

Pages

Page Objects
Simulation engine SimulationEngine, SimulationResult, ComparisonResult
State and orders InventoryStateDataFrame, OrderDecision, OrderLines
Policies BasePolicy, OrderUpToPolicy, ReorderPointPolicy, SingleOrderPolicy, newsvendor_critical_fractile, ReorderPointTargetProvider
Decision schedules DecisionSchedule, PeriodicSchedule, OneTimeSchedule, ExplicitSchedule
Ordering constraints OrderingConstraints, OrderingConstraint, MinimumOrderQuantity, OrderMultiple, MaximumOrderQuantity, ShelfSpaceLimit, ConstraintContext, ConstraintResult
Callbacks SimulationCallback, CallbackContext, adjustment results, scheduled callbacks, CallbackError
Suppliers SupplyModel, Supplier, SupplierAllocation, SupplierShares, AllocationContext, DeliveryOutcome, DeliveryContext
Processes and shelf life ShelfLife, InventoryProcess, Flow, ProcessFlows, ProcessContext, StockChange, FIFOLotLedger
Evaluation InventoryEvaluator, validate_event_frame, BaseInventoryMetric, CoverageMetric, TotalCost
Metrics all 37 metric functions
Utilities DemandGenerator, update_inventory_with_orders, place_order_lines
Plots the six plotting functions
Output tables columns of the event table, order frame, callback audit, process flows, and manifest

Stability

For the 0.1.x releases, public imports, required arguments, output columns, metrics, and documented behaviour keep their names and meanings. New arguments, columns, and objects may be added. Names starting with an underscore and direct imports from implementation modules are internal.