[Top][All Lists]

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

Re: [Help-glpk] Setting initial integer solution in GLPSOL

From: Andrew Makhorin
Subject: Re: [Help-glpk] Setting initial integer solution in GLPSOL
Date: Mon, 15 Dec 2008 08:16:00 +0300

> 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.

No. I think such feature should be implemented without the callback
routine. Namely, there should a parameter in glp_iocp indicating that
the current solution stored in the mip segment of the problem object
(either by the mip solver from previous call or by the application
program itself) has to be used as a heuristically found solution.
This assumes that there should be api routine to store a solution
to one of three solution segments as well as another routine to check
its feasibility.

reply via email to

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