[Top][All Lists]

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

[Help-glpk] Problem with min command

From: Victor Gutierrez
Subject: [Help-glpk] Problem with min command
Date: Mon, 2 Jul 2012 09:23:33 -0700 (PDT)

Initially I wanted to detect the index of an array where the value is different of zero, you guys helped me suggested me the following command:

param index1 := min{k in SCHEDULES: values[k] != 0} k;

The problem arises because there are some cases where the whole array "values" has zero values, and the min command does not work, a message error is shown:
"min{} over empty set; result undefined
MathProg model processing error"

and for these cases a value of index=1 will help me a lot.
Does anybody have some suggestions?
Thank you very much for your time

reply via email to

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