Optimization tools
Project description
Optool - Optimization tools
Generally usable utilities related to optimization problems.
Optool is a comprehensive Python package that simplifies the formulation of numerical optimization problems by supporting the use of units of measurements and parallel execution of optimizations. In addition, the package includes advanced data validation capabilities and provides out of the box serialization of a variety of well-known data types.
Highlights
- Easy to use optimization framework built around CasADi, allowing to specify the problem with units of measurements.
- Integrated data validation using Pydantic.
- Additional Pydantic-compatible fields for a variety of well-known data types such as Numpy arrays, Pandas Series and DataFrame objects, unit and quantity objects of Pint.
- Out of the box serialization to JSON of a variety of well-known data types within data models.
- Parallelization of optimizations with convenient redirection of logging statements.
Installation
optool
can be installed from PyPI:
python -m pip install optool
Dependencies
The following libraries are necessary to run the program code.
- CasADi is a symbolic framework for numeric optimization implementing automatic differentiation.
- Humanize provides various common string-related utilities like turning a number into a fuzzy human-readable duration (e.g. 3 minutes ago).
- Loguru intends to make Python logging less painful by adding a bunch of useful functionalities that solve caveats of the standard loggers.
- Numpy is the fundamental package for scientific computing with Python.
- Pandas provides fast, powerful, flexible and easy to use features for data analysis and manipulation.
- Pint allows to define, operate and manipulate physical quantities. It allows arithmetic operations between them and conversions from and to different units.
- Pint-pandas provides an extension to Pandas, which allows Pandas to recognize the quantities and store them in Pandas data frames and series.
- Pydantic provides extensive data validation features and serialization capabilities using Python type hints.
Extra dependencies are needed for development. However, all processes are automated using Tox, which automatically installs the required dependencies. Hence, Tox is the only Python package stringently necessary.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.