help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] data input problem


From: Duilio Foschi
Subject: [Help-glpk] data input problem
Date: Fri, 06 Feb 2004 17:03:13 +0100

I have a parameter declared as :

param Coverage {Chains,Days,Shifts} binary;  

Chains go from 1 to 267
Days go from 1 to 7
Shifts go from 1 to 4

every chain covers only one shift a day.

I get data in human-readable form as:

      1 2 3 4 5 6 7
   1 1 1 2 4 1 4 4
   2 1 1 2 4 2 4 4
   3 1 1 2 4 4 1 1
   4 1 1 2 4 4 2 2
   5 1 1 2 4 4 3 3
   6 1 1 3 4 4 1 1
   7 1 1 3 4 4 2 2
   8 1 1 3 4 4 3 3
   9 1 1 4 1 1 4 4
  10 1 1 4 1 2 4 4
...


in order to feed data to the program, AFAIK I need to change it into
the format:

param Coverage default 0 : 


[1,*,*]:
      1 1 2 4 1 4 4
   1 1 
   2    1 
   3       1 
   4           1 
   5              1 
   6                 1 
   7                    1


[2,*,*]:
      1 1 2 4 2 4 4
   1 1
   2    1
   3        1
   4           1
   5              1
   6                 1
   7                    1

[2,*,*]:

 
      1 1 2 4 4 1 1
   1 1
   2    1
   3       1
   4          1
   5             1
   6                1
   7                    1   

is there any quicker way to input the binary data ?

Thank you

Duilio Foschi   




reply via email to

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