[Top][All Lists]

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

[Help-glpk] glpsol string parameters

From: Grzegorz Nowak
Subject: [Help-glpk] glpsol string parameters
Date: Tue, 27 Mar 2007 03:12:49 +0200

Hello, I am working on a Dial a ride problem (DARP), and would be very
grateful if somebody could give a hint to, what I am doing wrong.

a little sample of my model looks like this:

set I;
set J;

param matrice {I, J} integer, >= 0;
param kunder {1..1, 1..2};

var x1 integer, >=0;

maximize objekt: x1;

s.t. test: x1 <= matrice[kunder[1,1], kunder[1,2]];


set I := aab tirstrup;
set J := herning silkeborg aarhus skjern kolding;

param matrice (tr):
                                aab    tirstrup:=
        herning  150    100
        silkeborg   120    60
        aarhus   110    25
        skjern   200    150
        kolding  220    125;
param kunder:
1               aab
2               skjern;


This little test worked great with matrice["aab", "skjern"] when
plotted in directly. The problem arose when I tried to implement the
parameter "kunder", which should contain all the customers and their
origin with the value 1 and destination with the value 2. What I
thought would happen is when i call kunder[1,1] I would get origin of
customer 1 = "aab", and kunder[1,2] would get me the destination of
customer 2 = "skjern".

I have tried to fix this with param kunder symbolic in "a set", but I
did not seem to work. I also tried to set " and ' around the string
parameters, but it didn't work either.

While I am at this, is there any explanation for the (tr) I found it
in an online model somewhere, but documentation is pretty sparse on
this area.

Any help is very appreciated or a link where I can find more information.

Thanks, Grzegorz, logistics student at

reply via email to

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