help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] a mistake with thinking


From: glpk xypron
Subject: Re: [Help-glpk] a mistake with thinking
Date: Thu, 14 Oct 2010 21:06:40 +0200

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


-------- Original-Nachricht --------
> Datum: Thu, 14 Oct 2010 07:29:11 -0600
> Betreff: [Help-glpk] a mistake with thinking

> Hello,
> I'm new to GLPSOL and
> trying to solve a simple task with it, but
> my output is too small as for me - trying to maximize). I think I have an 
> error somewhere and can't find it.
> maybe someone can find it and can help me. 
> 
> Thanks in advance 

-- 
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl



reply via email to

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