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   henne...@web.cs.ndsu.nodak.edu
"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