-
Notifications
You must be signed in to change notification settings - Fork 8
Install
openCEM runs on Python 3 using Pyomo and an optimisation solver. The following instructions apply in general terms to most systems. Operating System specific instructions coming soon.
- A computer with at least 16 GB of RAM (32 GB or more recommended)
- Windows, MacOS or Linux OS
- At least 5 GB of storage (hard drive) space available for results.
- An active internet connection for the duration of the run
To obtain a copy of openCEM you have to either download this repository or clone it using git (may require installing git separately). To clone with git type the following on a command promtp
git clone https://github.com/openCEMorg/openCEM.gitopenCEM runs on Python 3 (64 bit), refer to your OS on how to install it in your computer.
In addition you will need to install a series dependencies used in openCEM. To install Python 3 dependencies type the following on a command prompt from the directory where your copy of openCEM resides.
pip install -r requirements.txtIf openCEM dependencies conflict with dependencies for other projects installed in your machine, consider putting openCEM in a virtualenv environment.
Thanks to Pyomo, openCEM supports a range of open source and commercial solvers. By default, openCEM uses the COIN-OR Cbc solver. Visit the Cbc project page for more information.
The recommended source for CBC is the coincbc package from Anaconda Cloud, which supports fairly recent binaries for Linux and MacOS.
For Windows users, the recommended source is one of the binaries in the AMPL open source solvers page. Depending on your version of Windows, you may need to choose between the 32-bit binary or the 64-bit binary. Place the file cbc.exe in a folder that is listed in the PATH variable for your system, or a folder of your choice, which will need to be added to the PATH variable for your system.
Other solvers supported by openCEM:
- COIN-OR clp (open source, no binary constraints)
- Gurobi (commercial)
- CPLEX (commercial)
- GLPK (Open source, only small model instances)
Consult the Pyomo documentation for other supported solvers that work with large scale linear programs.
For a Conda based installation (e.g. Anaconda, MiniConda), the environment.yml provided that installs all openCEM dependencies (including the CBC solver) in an environment called opencem. To install type:
conda env create -f environment.ymlActivate the environment with:
conda activate opencemIn a python console run the command pytest from the openCEM installation directory. It runs a small example and verifies against a known solution as well as testing the generation of auxiliary files.
If all tests execute correctly and pass, your machine is ready to run openCEM. Here is an example of a successful test message:
pytest
................................................................ [100%]
64 passed in 7.38 secondsIf the suite is to be run with a solver different than the default, this must be passed as an option to pytest. For example, using GLPK:
pytest --solver=glpk
................................................................ [100%]
64 passed in 7.38 secondsReturn to the home page, or to the Technical documentation page for usage instructions and more.