help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: a mistake with thinking


From: mmmax
Subject: [Help-glpk] Re: a mistake with thinking
Date: Mon, 18 Oct 2010 05:09:09 -0600

glpk xypron writes:
Hello
my output is too small as for me - trying to maximize).
your result is too big. You are assgigning doctors to services that
they are not fit for. You can show this by adding the following
after the solve statement: printf {i in dienst,j in arzt, t in tag : x[i,j,t] > 0.5 and not (j, i) in geeignet } "ungeeignet: dienst %i, arzt %i, tag %i\n", i, j, t;
For many services no doctor is suited. Hence a great part of the
demand cannot be fulfilled.
You should not allow the unserved jobs xUD to become negative:
var xUD{i in dienst, t in tag}, >= 0; xUD is not needed anyway, you could use the following constraints: s.t. cNachfrage{i in dienst, t in tag }: sum{j in arzt}x[i,j,t] <= nachfrage[i,t]; s.t. cAnwesenheit{i in dienst, j in arzt, t in tag : not (j,t) in anwesend} : x[i,j,t] = 0;
s.t. cEignung{i in dienst, j in arzt, t in tag : not (j,i) in geeignet} :
x[i,j,t] = 0; Best regards Xypron



Thank you very much for your help one more question: is it possible to pass an array-solution x[i,j,t] (defined as variable) to an another GLPSOL script and use it as a param-array ?



reply via email to

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