-
Go to Anaconda Individual Edition site: https://www.anaconda.com/products/individual
-
Download the 64-bit command line installer for Python 3.7
-
chmod +x Anaconda3-<version>-MacOSX-x86_64.sh
-
./Anaconda3-2020.02-MacOSX-x86_64.sh -b -t
-
~/anaconda3/bin/conda init
-
If you are using zsh shell, add the following to
.zshrc
:# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/Users/harold/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/Users/harold/anaconda3/etc/profile.d/conda.sh" ]; then . "/Users/harold/anaconda3/etc/profile.d/conda.sh" else export PATH="/Users/harold/anaconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<
-
Start a new shell
-
You can get a free Community Edition of CPLEX Optimization Studio, with limited solving capabilities in term of problem size.
-
Faculty members, research professionals at accredited institutions can get access to an unlimited version of CPLEX through the IBM® Academic Initiative.
That is, get this repo.
cd SCLPsolver
An Anaconda environment will allow you to install packages and configure Python for running SCLP. You can activate/deactivate the environment whenever you like, so that the SCLP setup is contained to this project.
- Optional: create an Anaconda environment
conda create --name SCLP python=3.7
- Optional: activate the environment
conda activate SCLP
xcode-select --install
- Use conda installer.
conda install --yes --file sclp_requirements.txt
- Install OpenMP.
conda install -c conda-forge openmp
- If you want to run the Design of Experiments, and you have CPLEX installed, install the CPLEX installer PIP installer
pip install -r doe/cplex_integration/cplex_requirements.txt
. Note: as of this writing, you cannot use conda install for the doopl package on Mac.
Note: there is now a script for Mac that compiles and runs all of the below steps.
./cythonize.sh
Or do it manually:
cd subroutines/equation_tools
python setup.py build_ext --inplace
cd ../lp_tools
python setup.py build_ext --inplace
cd ../state_tools
python setup.py build_ext --inplace
cd tests
- Generate random re-entrant line problem and solve it using simplex-type algorithm and CPLEX discretization.
Note: if you have no CPLEX you should comment all starting from line 70 to the end of the file
DYLD_LIBRARY_PATH=/Applications/CPLEX_Studio_Community1210/opl/bin/x86-64_osx PYTHONPATH=.. python simple_reentrant_test.py
- Generate random MCQN problem and solve it using simplex-type algorithm and CPLEX discretization.
Note: if you have no CPLEX you should comment all starting from line 79 to the end of the file
DYLD_LIBRARY_PATH=/Applications/CPLEX_Studio_Community1210/opl/bin/x86-64_osx PYTHONPATH=.. python MCQN_test.py
- For the explanations on parameters and results look to the comments in the code and to the results.md