[Os-project-managers] Dip and OSResult

Kipp Martin kmartin at chicagobooth.edu
Thu Sep 9 21:11:25 EDT 2010


Hi Guys:

Working on an OS interface for Dip is bringing up some interesting issues.

Right now I am implementing a "generic" Dantzig-Wolfe decomposition 
algorithm. First, I create a vector of OSInstance objects, one 
OSInstance object for each block. At each iteration I loop over the 
vector and give it the correct objective function. So at each iteration 
the objective function changes.

In this implementation, we clearly do not want execute

CoinSolver::buildSolverInstance()

for each new objective function at each iteration. However, in the 
current implementation  we create the OSResult object in this method. 
This means when we call

CoinSolver::solve()

and then

osresult->setPrimalVariableValuesDense(solIdx, x);

we keep ADDING to the solution each time when we call solve.

I have just now modified the

CoinSolver::solve()

to have


	if(osresult != NULL) delete osresult;
	osresult = new OSResult();

so each call to solve() results in a new OSResult object  being created. 
This seems like the correct thing to do. Hopefully the creation of a new 
OSResult object with each call to solve will not be too expensive.

Working with Dip is very enlightening for OS.

Cheers
-- 
Kipp Martin
Professor of Operations Research
and Computing Technology
Booth School of Business
University of Chicago
5807 South Woodlawn Avenue
Chicago, IL 60637
773-702-7456
kmartin at chicagobooth.edu
http://www.chicagobooth.edu/faculty/bio.aspx?person_id=12825325568
http://projects.coin-or.org/OS



More information about the Os-project-managers mailing list