A modular framework for mixed integer programming
Project description
Optiframe
Optiframe is an optimization framework for writing mixed integer programs (MIPs).
It allows you to structure your MIPs in a way that allows clear separation of concerns, high modularity and testability.
Core Concepts
- The optimization process is divided into multiple steps which are clearly separated:
- Validation allows you to validate the input data.
- MIP building allows you to modify the MIP to define the optimization problem.
- Solving is a pre-defined step that obtains an optimal solution for the problem.
- Solution extraction allows you to process the variable values of the solution into something more meaningful.
- Tasks are the core components that allow you to implement functionality for each step.
- The constructor of a task allows you to define dependencies for that task, which are automatically injected by the optimizer based on their type annotation.
- The execute method allows you to implement the functionality. It may return data which can then be used by other tasks as a dependency.
- Packages combine tasks that belong together. Each package must contain a task for building the MIP and can additionally contain tasks for validation and solution extraction. The packages are what makes Optiframe so modular: You can define extensions of a problem in a separate package and only include it if needed.
- The optimizer allows you to configure the packages that you need. Afterwards, you can initialize it with the instance data and then solve the optimization problem.
Installation & Usage
pip install optiframe
Take a look at the examples
folder for examples on how to use Optiframe!
License
This project is available under the terms of the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
optiframe-0.1.0.tar.gz
(8.1 kB
view hashes)
Built Distribution
optiframe-0.1.0-py3-none-any.whl
(10.1 kB
view hashes)
Close
Hashes for optiframe-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67a582c351a9a770c390522cbdcadce2fc87557e4bd7cb792b151f4c9f1009e5 |
|
MD5 | 7e1bc50b9a01ad10ac472941e5a0b305 |
|
BLAKE2b-256 | 28bfc58e25e85f5e63c3490ac275258d384c8c4e73fed6ee53361fc7ddab0816 |