Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 5553239 Oct 30, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
optstoicpy
.gitignore Add .lp to gitignore Oct 29, 2018
LICENSE
README.md Update README.md Oct 30, 2018
__init__.py Add all files Jul 13, 2017
setup.py

README.md

OptStoic python package

Perform optStoic analysis using Python code that share the same data files with GAMS code.

Note: All the examples are specific for glycolysis pathway generation.

Install

git clone https://github.com/maranasgroup/optstoic-python.git
cd optstoic-python
python setup.py install

Requirement

At least one of the following optimization solvers should be installed. To solve the loopless optStoic formulation, an optimization solver other than GLPK is recommended.

  1. GLPK 4.47 installation

    wget  http://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz
    tar -xvzf glpk-4.47.tar.gz
    cd  ~/glpk-4.47
    ./configure
    make
    make install
    #if the program is successfully installed, you should get an output by typing
    glpsol --version
  2. GUROBI Optimization provide academic license for free (https://www.gurobi.com/). Install gurobipy following the instruction provided by GUROBI.

  3. SCIP Optimization Suite >= v4.0.0

sudo apt-get install libgmp-dev libreadline-dev zlib1g-dev libncurses5-dev
tar xvf scipoptsuite-6.0.0.tgz
cd scipoptsuite-6.0.0/
make
make test
cd scip-6.0.0/
sudo make install INSTALLDIR="/usr/local/"
/usr/local/bin/scip --version
  1. CPLEX Optimizer

Current project dependencies

  1. PuLP. Run the test.
pip install pulp
  1. pandas
pip install pandas
  1. Graphviz (Optional, for drawing pathway). The Graphviz software is required before installing the graphviz python package.

    #If you have root access
    sudo apt-get install graphviz
    
    #If you do not have root access (you can get a different version of Graphviz from their website https://www.graphviz.org/download/)
    cd $HOME
    mkdir -p bin/graphviz
    wget http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz
    tar xvf graphviz-2.38.0.tar.gz
    cd graphviz-2.38.0
    ./configure --prefix=$HOME/bin/graphviz
    make && make install
    # Check if the graphviz is working
    cd $HOME/bin/graphviz/bin
    dot -V
    # Add the following line to your .bashrc
    export PATH=$PATH:$HOME/bin/graphviz/bin
    
    #Install the Python graphviz package
    pip install graphviz
  2. Component-Contribution (*Optional, unless you want to perform MDF analysis)

Tests

After cloning the repo or setup, please run tests as followed:

pip install nose 
nosetests -s -v 

To test the optimization algorithms, please run tests as followed. The runtime depends on the solvers selected by PuLP.

from optstoicpy.test.testAll import test_all_optimization_scripts
test_all_optimization_scripts()

Usage

Read the tutorial.

Development

To continue development with the code, please create a virtual environment and use python setup.py develop for installation.

Reference

Please cite Chiam Yu Ng, Lin Wang, Anupam Chowdhury and Costas D. Maranas, 2018 (under review).

You can’t perform that action at this time.