[Coin-discuss] feeding Symphony solutions on the fly
Michael Hennebry
hennebry at web.cs.ndsu.nodak.edu
Mon Jan 24 10:30:20 EST 2005
On Fri, 21 Jan 2005, Ted Ralphs wrote:
> I have added the ability for a user to apply primal heuristics and
> generate solutions on the fly by adding an additional argument to the
> callback function user_is_feasible(). Check the file
> Template/LP/user_lp.c for the following function stub:
>
> int user_is_feasible(void *user, double lpetol, int varnum,
> int *indices, double *values, int *feasible,
> double *objval, char branching,
> double *heur_solution)
> {
> }
>
> The relaxed solution is passed in sparse format, as before, through the
> arrays arguments indices[] and values[]. If the relaxed solution is
> found to be infeasible, it can be rounded or otherwise perturbed to
> produce a new feasible solution. If such a solution is found, it can be
> passed back to SYMPHONY in the array heur_solution[]. You also need to
> set *objval to the value of the solution in this case, as well as setting
Is the array in dense format?
> *feasible = IP_HEUR_FEASIBLE;
I think we have a data flow problem here.
Unless the new objective value is at most the old,
user_is_feasible still should give an indication of
whether the passed in data is feasible.
> If you determine that the solution SYMPHONY passed is feasible as it is,
> then simply set
>
> *feasible = IP_FEASIBLE;
>
> Even in this case, you can set the objective function value to the true
> value if desired to account for roundoff error. Note that SYMPHONY has
> two built-in primal heuristics (adapted from CBC) that can be run by
> setting the parameter "do_primal_heuristic" to TRUE. If you do a CVS
> update, you should see these changes. Note that this is not very well
> tested yet. Please give it a try and let me know if you run into any
> problems.
What happends if I do a CVS update in a copy of Template, say one named Tsp05?
--
Mike hennebry at web.cs.ndsu.NoDak.edu
"Our gods are dead. Ancient Klingon warriors slew them
... they were more trouble than they were worth." -- Worf
More information about the Coin-discuss
mailing list