help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Setting initial integer solution in GLPSOL


From: xypron
Subject: [Help-glpk] Setting initial integer solution in GLPSOL
Date: Sun, 14 Dec 2008 14:50:40 -0800 (PST)

Hello Andrew,

I would like to set the integer values of a possible solution in glpsol such
that this solution is used as a starting point for the branch and cut
solver. I do not want to preset the non integer values.

I have patched glpk-4.34 such that variable values can be preset, e.g.
var x := 4;

The changed files and diffs can be downloaded from
http://glpk.dyndns.org/viewvc/svn/glpk/glpk/branches/glpk-4.34-dot/

Changes (including changes for outputting dual values) are in
include/glpmpl.h
src/glpapi16.c (only changes for output of dual values)
src/glpmpl01.c
src/glpmpl03.c
src/glpmpl04.c (only changes for output of dual values)

What is missing, are the necessary changes to glpsol (glpapi17.c).

Would this be a correct implementation:

Create a callback routine. Pass it as parm.cb_func to glp_intopt.
In the callback routine react to the first call
with reason GLP_IHEUR as follows:
- Preset the integer variables in tree->mip.
- Initialize parameters: glp_init_smcp(&parm);
- Set parameters: parm.meth = GLP_DUALP;
- Solve the LP: ret = glp_simplex(tree->mip, &parm);
- Pass all variables with a call to glp_ios_heur_sol.

Is this a feature you would be willing to integrate into the distribution?

Best regards

Xypron

-- 
View this message in context: 
http://www.nabble.com/Setting-initial-integer-solution-in-GLPSOL-tp21005682p21005682.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]