Re: Slow performance on "Select minimum" task

Michael Hennebry <[email protected]>
Newsgroups gmane.comp.gnu.glpk
Message-ID <[email protected]>
On Wed, 6 Jun 2018, Jan van Rijn wrote:

> The way I interpreted your solution was that 'at least one y-value per
> column will be >= 1'.
> I don't see exactly which constraint makes sure that there will be exactly
> one y-value per column 1
> (which, again, we don't need if all values in M are >= 0).

You are correct.
The y's have no upper bound, not even one.

> If M contains negative values, it could be that:
> * an ideal solution would have multiple y-values per column bigger than
> zero, and
> * These values will not necessarily be one, but can take even higher values
> (due to this GLPK gave an error message, and this is how I found out)

In the case of negative M's,

Adding SUM y[r,c] = 1
         r

is sufficient.
The y's still do not need to be declared binary.

Being an added constraint, it might speed things up with positive M's.

-- 
Michael   [email protected]
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
                                                              --  someeecards
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.