help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Variable Definition over many sets in GLPK/L


From: NORBERT . PIOTROWSKI
Subject: [Help-glpk] Variable Definition over many sets in GLPK/L
Date: Tue, 8 Oct 2002 15:09:12 +0200

The following problem occurs:

set AC /*Aircraft: Registration*/ =
(
  SPEEA,
  SPEEB
);
set F /*Flights: No+DepAp*/ = 
(
 /*SPEEA*/
 LO3950POZ,
 LO3821WAW,
 LO3822GDN,
 (...)
 /*SPEEB*/
 LO3804RZE,
 LO3931WAW,
 LO3932SZZ
  (...)
);

parameter CONN[F,F]; /*allowed connection*/

CONN[#LO3950POZ,#LO3931WAW]
(...)

binary variable X[k in AC, i in F, j in F] where CONN[i,j];

display X;

X[LO3944POZ,LO3821WAW,SPEEB]
X[LO3944POZ,LO3991WAW,SPEEA]
X[LO3944POZ,LO3991WAW,SPEEB]
(...)

The index sequence is disturbed: aicraft is moved to the last position. This
implicates unpredicted behaviour in later constraints. We got a workaround
moving the Aicraft index to the last position. Without the where claus in
the variable declaration everything is OK.




reply via email to

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