Skip to main content

Balance Engine Optimization Icon
Balance Engine

GitHub License: MIT PyPI version Crates.io Crates.io Downloads

A Python/Rust module for production planning and optimization using linear programming.

Balance Engine automates calculations to balance production with demand, allowing for precise and efficient planning while reducing costs. It uses linear programming modeling to optimize resource allocation in limited production cycles.

The tool handles key production variables including:

  • Yielded Supply
  • On Hand (Finished Goods)
  • Safety Stock Targets
  • Sellable Supply
  • Effective Demand
  • Total Projected Inventory Balance

Installation

Python Package

pip install balance-engine

Rust Crate

cargo add balance_engine

Features

  • Hybrid Architecture: Core optimization in Rust for performance, Python API for flexibility
  • Production Planning: Balance supply with demand while respecting capacity constraints
  • Inventory Management: Calculate optimal inventory levels that meet safety stock requirements
  • Resource Allocation: Efficiently allocate limited resources in production cycles

Project Structure

  • Rust Core: High-performance linear programming solver
  • Python Interface: Easy-to-use API for integration with data analysis workflows
  • Example Code: Sample implementations for common production planning scenarios

Usage

import engine

# Initialize the engine
engine.init()

# Use the optimization functions
result = engine.optimize_production_plan(
    products=["ProductA", "ProductB"],
    demand_dict={"ProductA": 100, "ProductB": 150},
    production_rates_dict={"ProductA": 10, "ProductB": 15},
    available_hours=20,
    current_inventory_dict={"ProductA": 20, "ProductB": 10},
    min_inventory_dict={"ProductA": 10, "ProductB": 20}
)

print(result)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for balance_engine 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for balance_engine 0.0.2
File Size Uploaded
balance_engine-0.0.2.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for balance_engine 0.0.2
File Interpreter ABI Platform
balance_engine-0.0.2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details

Total release size: 120.9 kB

Release files / balance_engine-0.0.2.tar.gz

Download URL balance_engine-0.0.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0aeba63031cc54b8daca75401c15c18bf9602a04afd74fa6df7b9ed1ef4abfb8
BLAKE2b-256 checksum
How to use checksums
e626ae1af85ceb22e40487e79592e053d56befe12b20fc8432574cb975380a56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Release files / balance_engine-0.0.2-cp310-abi3-win_amd64.whl

Download URL balance_engine-0.0.2-cp310-abi3-win_amd64.whl
Size 115.0 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
585738dd36bd18676b2d98bd301e39ee89aa47442c076ee04078d01b56f196f1
BLAKE2b-256 checksum
How to use checksums
4952c6365795b21d94f4fe4b0eee0d7ba375322d0f4c22ba154d5e46a687fdb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page