> 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. _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
