[Top][All Lists]

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

Re: Gmpl How can I do this?

From: Michael Hennebry
Subject: Re: Gmpl How can I do this?
Date: Tue, 31 Mar 2020 18:33:42 -0500 (CDT)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

On Thu, 26 Mar 2020, siirto1 wrote:

I am trying to do some simple gmpl model but as a complete beginner I noticed I 
cannot do it.

THe issue appears not to be representing a model in GMPL,
but getting a model to represent.

   col1 col2 col3
row1  x
row2  x    x
row3  x    x    x

Assign numbers 1..6 to the x cells so that every number has different row and 
col than the previous number.

I suggest 2 2D arrays of binary values.
xincol[x, c] == 1 iff x in column c.
xinrow[x, r] == 1 iff x in row r.

Constraints are left as an exercise for the reader.

Michael   address@hidden
"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

reply via email to

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