Installation Guide

This guide will help you install and set up the optigob package for development or use in your own projects.

Requirements

  • Python 3.12 or higher

  • Poetry (recommended for development)

  • (Optional) pip for standard installation

  • (Optional) conda for environment management

Quick Install (for Users)

You can install the latest release from PyPI:

pip install optigob

OptiGob requires a solver to run optimizations. The recommended option is HiGHS, which you can install alongside optigob:

pip install "optigob[solvers]"

Alternatively, install just optigob and choose your own Pyomo-compatible solver from the list provided below.

Optional: Using Conda

If you prefer conda for environment management:

conda create -n optigob python=3.12
conda activate optigob
pip install poetry
poetry install

To include the recommended HiGHS solver:

poetry install -E solvers

Using Alternative Solvers

OptiGob requires a Pyomo-compatible solver to run optimizations. While HiGHS is the recommended built-in option (install with pip install highspy or poetry install --with solvers), you can use any solver supported by Pyomo.

To use a different solver, specify the solver_name parameter in your configuration:

from optigob import Optigob
from optigob.resource_manager.optigob_data_manager import OptiGobDataManager

data = {
    # ... your scenario parameters ...
    'solver_name': 'glpk'  # Use GLPK instead of HiGHS
}
data_manager = OptiGobDataManager(data)
optigob = Optigob(data_manager)

For a complete list of available Pyomo-compatible solvers, see the Pyomo documentation.

To use a specific solver, ensure it is installed in your environment, then specify it via solver_name.

To update to the latest version from PyPI:

pip install --upgrade optigob

Or, if using Poetry in development mode:

poetry update

Troubleshooting

  • If you encounter issues with dependencies, try updating Poetry and pip.

  • For platform-specific issues, please check the GitHub Issues page.

Additional Resources

If you have any questions or need help, please open an issue on GitHub or contact the maintainers.