Install
May 7, 2026 ยท View on GitHub
Environment
Python 3.10, Ubuntu 22.04
Install SCIPOPTSuite
Download SCIPOPT8.0.0
Run it in the terminal
bash SCIPOptSuite-8.0.0-Linux-ubuntu.sh
Go to the repository
conda create -n ecole python=3.10
conda activate ecole
conda install gcc_linux-64 gxx_linux-64 gfortran_linux-64 liblapack tbb cliquer openblas gsl patchelf scikit-build cmake=3.22 ninja numpy fmt
Setup
# DSCIP_DIR is replaced by your SCIPOPT path
CMAKE_ARGS="-DSCIP_DIR=/workspace/SCIPOptSuite-8.0.0-Linux/lib/cmake/scip -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" python setup.py develop
Check Ecole
python -c "import ecole; print(ecole.__file__)"
# console output: /workspace/ecole/python/ecole/src/ecole/__init__.py
Test Ecole
python test_ecole.py
New Features
New observation function
Add new observation functions (named Khalil2016Flash and NodeBipartiteFlash), which only exact the required features amony Khalil2016 and NodeBipartite features.
Quick Start
Given the USED_FEATURES (List), construct the observation function as follows:
myNodeObs = ecole.observation.NodeBipartiteFlash()
myKhalilObs = ecole.observation.Khalil2016Flash()
extract_features_node = [fea for fea in used_features if fea < 19]
extract_features_khalil = [fea - 19 for fea in used_features if fea >= 19]
myNodeObs.set_active_features(extract_features_node)
myKhalilObs.set_active_features(extract_features_khalil)
flash_obs_env = ecole.environment.Branching(observation_function={"Node": myNodeObs, "Addition": myKhalilObs}, scip_params=scip_params)
Unit Test (if needed for developing C++ Source Code)
cd _skbuild/linux-x86_64-3.10/cmake-build
cmake --build . --target ecole-lib-test
Only test those unit tests with tag "[obs]"
./libecole/tests/ecole-lib-test "[obs]"
Test all unit tests
ctest --output-on-failure