help-glpk
[Top][All Lists]
Advanced

[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: Renan Silva
Subject: Re: [Help-glpk] Generating a Gomory cut and inserting it into a Linear Program
Date: Fri, 12 Feb 2016 15:04:12 -0200

I made a new routine to add the Gomory's cut directly into a linear program based on the gen_cut routine and the ios_gmi_gen and I added a prototype to the glpk.h file. Then I used the -Lsrc/.lib and -Isrc compiler flags to point the compiler to the correct location of the modified library, but I am gettingĀ  undefined reference to `gen_cut_lp'.

I am not sure what I missed. Do I need to edit the Makefile in someway?

Sorry my lack of expertise on this topic, it is the first time I am editing a code this big.

2016-02-12 11:51 GMT-02:00 Andrew Makhorin <address@hidden>:

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