Skip to content

Python library for Applied Computational Supply Chain & Logistics. Unlock Neural Nets, Bayesian EOQ, Optimization, Time Series, and more for smarter decisions.

License

Notifications You must be signed in to change notification settings

supplyseer-ai/supplyseer

Repository files navigation

SupplySeer Vision banner

SupplySeer

Welcome to version 0.2 (pre-release alpha)!

⚠️ Pre-release Software Notice: This library is currently in pre-release alpha (v0.2). The repo may undergo significant changes before the 1.0.0 release. While the statistical implementations are sound, we recommend testing thoroughly before using in production environments.

supplyseer is a Python library focused on providing the tools and methods for real-world Supply Chain & Logistics challenges.

You'll find Bayesian Economic Order Quantity (dynamical stochastic EOQ), Probabilistic Bayesian Networks, Neural Networks,
Principal Component Analaysis, time series models like ARIMA, and evaluation metrics for models and for information content.

Supplyseer provides Permutation Complexity as a metric for time series analysis but also Manipulability Index and Hurst Exponent and many more.

Check Tutorials section for guides and examples!

Installation

You can install supplyseer directly from PyPI:

pip install supplyseer==0.2.1

For development installation, see our Contributing Guide.

Features

🚀 Features

  • Advanced Forecasting Models: ARIMA, Neural Networks, and Mixture Density Networks
  • Uncertainty Modeling: Bayesian Networks and Probabilistic Models
  • Inventory Optimization: Dynamic Bayesian EOQ and Traditional EOQ
  • Time Series Analysis: Complex metrics and tools for deep analysis
  • Supply Chain Optimization: Scheduling and routing solutions

Models

Below are some models listed

Model Use case
ARIMA Time Series
Bayesian Network Uncertainty Modeling, Prediction, and Causal Inference
Bayesian EOQ Economic Order Quantity with distributions instead of fixed values
Neural Network Machine Learning Modeling
Mixture Density Network Probabilistic Machine Learning Modeling with multi-modal data
Principal Component Analysis Embeddings in Machine Learning (dimensionality reduction)
Hawkes Process Multivariate Hawkes process in supply chains models how disruptions in one area can trigger related issues across the network, predicting ripple effects from initial events.
Supply Chain Digital Twin Network A Supply Chain Digital Twin of the real Supply Chain is a computer model that represents the processes and components of the real one
Game Theory Module Cooperative Supply Chain game with Coalition based gaming among players (suppliers, manufacturers, retailers) and you.

Tools & Metrics

Name Use case
Time Upsampling Good when you have missing dates between samples
Taken's Embeddings Extract the dynamics of a time series/signal
Economic Order Quantity This is the basic function of EOQ that returns a value while the Bayesian EOQ is a dynamic model
Manipulability Index Another way of measuring volatility and stability of a time series. Also a measure of "responsiveness", e.g. promotional campaigns as interventions
Hurst Exponent R/S Measure long-term memory or autocorrelation in a time series
Shannon Entropy Measures the unpredictability or randomnesss
Permutation Entropy Quantifies the diversity of patterns in the ordinal structure of a time series. It is the first output of permutation_complexity()
Statistical Complexity Measures the structural complexity of a system. It combines entropy with disequilibrium (a measure of structure). It is the second output of permutation_complexity()

Optimization

This library also supports basic optimization with Google's ortools. See below example for a Truck Driver scheduling problem.

SupplySeer Vision banner

Truck Driver Scheduling problem - You have some truck drivers that you need to schedule for over a time window of 3 days with 3 shifts. Morning, afternoon, and evening. If they had the evening shift they cannot have the morning shift the day after because they need to rest. Also, they have to deliver at least 2 shifts during the 3 day window.

Problem: Schedule truck drivers over a 3-day window with multiple constraints:

* Three shifts per day (Morning, Afternoon, Evening)
* Rest period required between evening and next morning shift
* Minimum 2 shifts per driver over 3 days

Demand & Inventory Control - A Supply Chain department for a retail company needs to balance their inventory and demand such that there is also enough inventory to match the demand but the inventory is not allowed to go below a certain level nor above a certain level.

Problem: Optimize inventory levels while,

* Meeting demand requirements
* Maintaining minimum safety stock
* Respecting maximum storage capacity

Tutorials & Examples

In this section you'll find Tutorials and Examples, they exist in respective subfolder. Their differences is that tutorials are comprehensive and examples are just quick demonstrations of the modules.

Tutorial Description
Supply Chain Digital Twin Simulating Digital Twins with classical policy, diffusion based reorders, and hybrid mode. Kinetic energy represents how well the system is "flowing" in balancing inventory.
Stochastic Demand Simulation with decaying Geometric Brownian Motion Simulate stochastic demand processes using a Geometric Brownian Motion (GBM) model with decay, produce mean path trajectories, simulate thousands of paths, and find the final distribution of your demand at end time T
Game Theoretic Supply Chain Create a Cooperative Game in your Supply Chain with your suppliers and manufacturers to find partnerships, coalitions, and Nash equilibrium
Geopolitical Risk API & GDELT Monitor API Explore the supplyseer API for Geopolitical Risk assessments and do Sentiment Analysis with the GDELT Monitor API and HuggingFace

Example Description
Bayesian Economic Order Quantity Modeling Simulate Bayesian EOQ with Approximate Bayesian Computation with Normal distributions. Dynamic and Stochastic approach with credible intervals.
Multivariate Hawkes Demand and Inventory Creates a self-exciting Supply Chain simulation of demand and inventory process.
Probabilistic Bayesian Network Model your expertise, knowledge, or data as a Probabilistic Network to do causal analysis, counterfactual analysis, or probabilistic modeling
Vector Field Dynamics Analysis of Demand and Inventory Use Physics based approaches to your demand and inventory analysis by using Vector Fields to find equilibrium states, convergence, or divergence paths in your Supply Chain system.
Truck Driver Scheduling Optimization Schedule the most optimal way for your truck drivers with realistic constraints.
Demand and Inventory Control Find the most optimal way for your demand and inventory that holds your costs.
Topological Time Series Use financial stock tickers, Tesla and Apple, and Takens Embeddings with PCA to do phase space reconstruction of the signal.

Contributing 🤝

We love contributions! Whether you're fixing bugs, adding features, or improving documentation, your help makes supplyseer better for everyone.

Check out our Contributing Guide to get started, and join our friendly community. No contribution is too small, and all contributors are valued!

Want to help but not sure how? See our Issues or start a Discussion. We're happy to guide you! 🎲✨

About

Python library for Applied Computational Supply Chain & Logistics. Unlock Neural Nets, Bayesian EOQ, Optimization, Time Series, and more for smarter decisions.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages