[Cmpl] How to deduct a constant from the optimised objective value through coliop/cmpl codes

Mike Steglich mike.steglich at th-wildau.de
Thu Aug 22 12:26:04 EDT 2013


Hello Priyanki,

Welcome to the Cmpl user group!  

For doing some calculations with the objective value of a solved problem you can use pyCmpl, that is part of the Cmpl package since version 1.8. pyCmpl is Cmpl's Python API and is described in the manual in chapter 11. 

It is necessary to create a short python script additionally to your CMPL model. 

e.g. sample.py
#!/usr/bin/python
from pyCmpl import *
model = Cmpl("sample.cmpl")
model.solve()
valueFromModel=model.solution.value
To execute this script including solving your model you have to type pyCmpl sample.py
There are a lot of opportunities to manipulate the parameters of Cmpl models and to obtain the solution(s) with pyCmpl. You can find some examples in chapter 11. 
Could you subscribe to the Cmpl mailing list because after subscribing your messages will be accepted automatically by the system.

Cheers

Mike



Am 22.08.2013 um 17:36 schrieb Priyanki Sharma <priyankiarch at yahoo.com>:

> hello.....
> 
> 
> I am a new member of this group. I am a recent user of coliop / cmpl codes. I am wondering if I could get some assistance in how you can deduct a constant from the optimized objective function to get, say for example net loss. Is there any way in which you can actually use the optimized value of objective function (obtained after solving)  for any further calculation. The manual does not provide much info. Could someone help please????
> 
> 
> cheers
> priyanki
> _______________________________________________
> Cmpl mailing list
> Cmpl at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cmpl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20130822/83bd32df/attachment.html>


More information about the Cmpl mailing list