[Top][All Lists]

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

Re: [Help-glpk] Generating a Gomory cut and inserting it into a Linear P

From: Andrew Makhorin
Subject: Re: [Help-glpk] Generating a Gomory cut and inserting it into a Linear Program
Date: Fri, 12 Feb 2016 16:51:01 +0300

> What I am trying to do is to access the cuts generated by those
> functions so that I can use it. ideally I would like to work only with
> the model without having to use the tree. 
> The first thing that I tried to do is to manually create a tree with
> only a node, which is the linear program that I am working on and
> directly call the ios_gmi_gen function. However this function adds the
> generated cuts to the cut pool and what I want to do is to add it
> directly to the model. I guess that the function gen_cut (defined on
> the glpios05.c file) would be better suited to my needs, since it is
> the function that generates the cut associated with the variable.
> Another problem that I am facing is that I am unable to access those
> functions directly.
> What should I do to get the cuts? Ideally I would like to have them
> returned to me so that I can inspect it and them add to the linear
> program.
> TL;DR; I want to have returned to me the gmi and mir cuts generated.

You may modify the routines ios_gmi_gen (in glpios05.c) and ios_mir_gen
(in glpios06.c) to add cuts directly to the current subproblem rather
than to the cut pool, or to store the cuts to some external arrays. Hope
the comments provide you enough information to do that.

reply via email to

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