[Coin-discuss] Python port of OSI
Hart, William E
wehart at sandia.gov
Mon May 19 09:37:02 EDT 2008
I'm definitely interested in this. This past year I've been working Pyomo, a Python math modeling tool, and this type of interface is a natural tool for use in this context!
Pyomo is a close cousin to POAMS, and Leo Lopez has done similar interfaces for POAMS.
--Bill
----- Original Message -----
From: coin-discuss-bounces at list.coin-or.org <coin-discuss-bounces at list.coin-or.org>
To: coin-discuss at list.coin-or.org <coin-discuss at list.coin-or.org>
Sent: Mon May 19 04:11:20 2008
Subject: [Coin-discuss] Python port of OSI
Hi all,
I'm working on a python module to use OSISolverInterface
( using Boost-python ). The idea is to have a pyOSI.so (dll in Windows)
to do something as:
import pyOSI
theSI = pyOSI.getOsiClp()
#Read in an mps file. This one's from the MIPLIB library.
#si->readMps("../../Data/Sample/p0033");
theSI.readMps("p0033")
#Solve the (relaxation of the) problem
theSI.initialSolve()
#Check the solution
if ( theSI.isProvenOptimal() ):
print "Found optimal solution!"
print "Objective value is %f" % theSI.getObjValue()
n = theSI.getNumCols()
solution = theSI.getColSolution()
for i in solution:
print i
else:
print "Didn't find optimal solution."
and this is what I have done at the moment.
Please, let me know if someone is interested.
Thanks,
Andrea
_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss
More information about the Coin-discuss
mailing list