-
Notifications
You must be signed in to change notification settings - Fork 114
OR-Tools Integration & C++17 upgrade #1035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
We now have or-tools fork which lives here: https://github.com/NREL/or-tools When using this fork, I was unable to build or-tools using Instead I built or-tools with I was able to run the test using SCIP and Xpress. |
To use:
Download OR-Tools version 9.8 source separately in the same directory as sam, ssc, etc. https://github.com/google/or-tools/releases/tag/v9.8
Set the directory via
export ORTOOLSDIR=$HOME/.../sam-dev/or-tools/install(for Windows, set the environment variable)Then build and install it with CMake.
If using XPRESS, add
-DUSE_XPRESS=ON -DXPRESS_ROOT=${XPRESS_ROOT}to the cmake config commands below. IfXPRESS_ROOTis defined as an environment variable, you don't need to add-DXPRESS_ROOT=${XPRESS_ROOT}to the CMake command.Unix
Environment variable: ORTOOLSDIR =
/path/to/or-tools/install/install_releaseWindows
Use
x64 Native Tools Command Prompt for VS 2022and note VS 2022 is required. IfXPRESS_ROOTis defined as an environment variable, you don't need to add it to the CMake command. Windows requires building both Debug and Release. In addition, these are built in separate directories namedinstall_releaseandinstall_debug. The "release" and "debug" text is needed in the names for the CMake to switch between the configurations.Environment variables:
ORTOOLSDIR =
/path/to/or-tools/install_releaseORTOOLSDBDIR =
/path/to/or-tools/install_debugThen the .sln file can be used in Visual Studio
Test OR-tools in the Test via the
lib_ptes_chp_dispatch_testtest.If downloading OR-Tools binary from their website https://developers.google.com/optimization/install/cpp, then set
ORTOOLSDIRto the extracted folder.ORTOOLSDIRshould contain the 'lib', 'cmake', 'bin', etc folders.