-
Notifications
You must be signed in to change notification settings - Fork 37
Troubleshooting
When using the Pyomo dispatcher on Windows, HERON by default uses the GLPK solver. This solver can at times fail to find a solution to an optimization problem when other solvers are successful. An example of this is the storage integration test located at ~/HERON/tests/integration_tests/workflows/storage
. HERON sets up the Pyomo model correctly, however, the solver fails to find a solution. This model can be written to a file (.lp
or .nl
) before an attempted solution with the GLPK solver. Using the command line interface of other solvers like CBC or IPOPT, the saved file can be loaded and successfully solved.
Installing the CBC solver will enable similar behavior to Mac and Linux environments. An installer for Windows that takes care of setting the Path
environment variable can be found here: https://www.coin-or.org/download/binary/OptimizationSuite/. The COIN-OR-1.8.0-win32-msvc12.exe
installer requires Visual Studio as seen here: https://coin-or.github.io/user_introduction.html#installers-and-packages. Once CBC has been installed and the Path
environment variable has been set, set the <solver>
subnode of the HERON input file to cbc
:
<Case>
...
<dispatcher>
...
<pyomo>
<solver>cbc</solver>
</pyomo>
</dispatcher>
</Case>
There have been some issues with installing the IPOPT solver on Windows, particularly with having Windows recognize it when running Pyomo dispatch. There are typically three ways of installing the IPOPT solver for RAVEN/HERON:
-
Installation through RAVEN by selecting optional dependencies installation (as shown in Git Bash):
cd $PATH_TO_RAVEN ./scripts/establish_conda_env.sh --install --optional
You will know IPOPT is successfully installed if you can find
ipopt.exe
(try searching through File Explorer, sometimes its in a subdirectoryIpopt/bin/ipopt.exe
). -
Generic installation through conda
conda install -c conda-forge ipopt
You will know IPOPT is successfully installed if you can find
ipopt.exe
(try searching through File Explorer, sometimes its in a subdirectoryIpopt/bin/ipopt.exe
). -
If all else fails, manually install from https://github.com/coin-or/Ipopt/releases
- Download the binary file for a
win64
installation - Extract to desired directory (suggest somewhere in Documents or a general location)
- Find the executable under
bin/ipopt
- Copy full path location for IPOPT executable (e.g.,
C:\Users\sotogj\Ipopt\bin\ipopt
)-
Add this path to your User Environment Variables:
(a) Open Windows Settings
(b) Select "edit environment variables for your account" (NOT the system variables)
(c) Add the path location of IPOPT executable to your path:
-
- Download the binary file for a
If (1) and (2) generate a executable but when running HERON/RAVEN it errors saying the IPOPT executable can't be found, be sure to follow steps 3(a) - 3(c).
Note that input files can have a few different ways to find data. Input files can specify that they are relative to %HERON_DATA%
. In a git clone this is stored in HERON/data
but can be overridden with a HERON_DATA
environmental variable. For pip installed HERON, a zip with the HERON data can be found on the releases page https://github.com/idaholab/HERON/releases