• Eastham, Cape Cod, MA, US

work: new way to install COS CE and DOcplex!

Just as I finished my series of posts on how to :

an exciting new announcement was made … CPLEX for Python is now available on ANACONDA CLOUD!

Getting up and running with DOcplex is easier than ever.

conda install
conda install

Once you have Anaconda installed as described here, open a Terminal window and run the command conda install -c IBMDecisionOptimization docplex cplex. This installs the packages that are available here.

~$ conda install -c IBMDecisionOptimization docplex cplex
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment /Applications/anaconda:

The following NEW packages will be INSTALLED:

    cplex:   12.7-py35_0    IBMDecisionOptimization
    docloud: 1.0.207-py35_0 IBMDecisionOptimization
    docplex: 1.0.630-py35_0 IBMDecisionOptimization

Proceed ([y]/n)? y

cplex-12.7-py3 100% |################################| Time: 0:00:01  10.81 MB/s
docloud-1.0.20 100% |################################| Time: 0:00:00   7.07 MB/s
docplex-1.0.63 100% |################################| Time: 0:00:00  10.86 MB/s

Now run the diet problem from the command line (examples available as described here):

~/MyStuff/Work/Python/Tests$ python diet.py
Model: diet
 - number of variables: 9
   - binary=0, integer=0, continuous=9
 - number of constraints: 7
   - linear=7
 - parameters: defaults
* model solved as function:
objective: 2.690
  "Spaghetti W/ Sauce"=2.155
  "Hotdog"=0.930
  "Chocolate Chip Cookies"=10.000
  "Lowfat Milk"=1.831
* KPI: Total Calories=2000.000
* KPI: Total Calcium=800.000
* KPI: Total Iron=11.278
* KPI: Total Vit_A=8518.433
* KPI: Total Dietary_Fiber=25.000
* KPI: Total Carbohydrates=256.806
* KPI: Total Protein=51.174
~/MyStuff/Work/Python/Tests$

Leave a Reply

Your email address will not be published. Required fields are marked *