help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] help


From: Andrew Makhorin
Subject: Re: [Help-glpk] help
Date: Sun, 24 Aug 2008 18:09:41 +0400

> I want to solve a proplem with glpk but i take an error. i give the
> model and the error below.

> my model is:

> set gecis{k in 1..9,i in 1..54,j in 1..54};
> var x{1..54,1..54}, integer, <= 6,>= 0;
> var y{1..18,1..54}, integer, <= 1,>= 0;
> minimize hareket: sum{i in 1..18, t in 1..54} t * y[i,t];
> s.t. kisitbir{t in 1..53,(k,i,j) in gecis}: x[i,t]-6*(1-y[k,t]) <=
> x[j,t+1];
> s.t. kisitiki{t in 1..53,(k,i,j) in gecis}: x[j,t]-6*(1-y[k+1,t]) <=
> x[i,t+1];
> data;
> set gecis := (1,1,18) (1,2,30) (1,3,42) (1,10,3) (1,22,2) (1,34,1)
> (1,18,54) (1,30,53) (1,42,52) (1,52,10) (1,53,22)
[...]
> end;

> error is:
> gecis must be subscripted
> Context: ]; s.t. kisitbir{ t in 1..53,(k,i,j) in gecis}
> Model processing error
> i try a lot of think but they didn't work. Please help me!

You incorrectly declared gecis as a 3-d set of sets while it should
be declared as a plain set of triplets:

set gecis, dimen 3;





reply via email to

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