First of all, the Local Solver must be installed on your local Windows or Linux machine. As well as Python3.10 or newer.
Also, IBM's ILOG CPLEX Optimization Studio must be installed on your local machine and must be avaialable through the PATH. Once it's installed, the following should be run once:
Bash (Linux)
sudo ln -s '/home/<user>/apps/ibm' '/opt/ibm'
sudo ln -s '/home/<user>/apps/localsolver_11_5' '/opt/localsolver_11_5'
echo -e 'PATH="$PATH:/opt/ibm/ILOG/CPLEX_Studio2211/cplex/bin/x86-64_linux"\n' >>~/.bashrc
CMD (Admin)
where cplex | sed 's/\\\\cplex.exe$//' | sed 's/\//\\\\/g'
cd "<last_output>\..\..\..\..\..\.."
python3 "IBM\ILOG\CPLEX_Studio2211\python\setup.py" install --user
Execute the following to enter a virtual environment depending on your terminal interpreter:
Bash (Linux)
python3 -m venv --clear .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python "/opt/ibm/ILOG/CPLEX_Studio2211/python/setup.py" install
python -m pip install localsolver -i "https://pip.localsolver.com"
Bash (Windows)
python3 -m venv --clear .venv
source .venv/Scripts/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install localsolver -i "https://pip.localsolver.com"
CMD
python3 -m venv --clear .venv
.venv\Scripts\activate.bat
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install localsolver -i "https://pip.localsolver.com"
Power Shell
python3 -m venv --clear .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install localsolver -i "https://pip.localsolver.com"
Unpack the problem instances:
python -c "import shutil; shutil.unpack_archive('instances.zip')"
Execute the main code:
python -m hybrid_dmrp instances/instancia1Tijuca_0.6.csv
To run test suites use:
python -m tests [[test_suite_name] ...]
If no other parameter is passed except the script name, all test suites are run. The parameters specify which test suites should run.
To update the dependencies just insert the new dependencies into requirements.in
and run (in the virtual environment):
python -m piptools compile --quiet --resolver=backtracking --output-file=requirements.txt requirements.in