Hi @David Kik, you can use
min(j | Parameter(j,k) <> na,Parameter(j,k))
to exclude 'na’. Note that this will evaluate to 'inf’ if all Parameter(j,k) are equal to 'na’.
Hi @Marcel Hunting. Your suggestion works so far. Thanks a lot!
However, as you have already noted, the problem occurs that for a given k, all parameters (j,k) are equal to 'na' which results in 'inf' for this k. Consequently, this leads to a incorrect result.
How can I exclude in my constraint (see below) that the resulting 'inf' is excluded and only positive values are considered for parameter (j,k)?
Constraint:
Auxiliary Variable >= Parameter(j,k) * Decision Variable (j,k)
Best,
David
Hi @David Kik, you can use
min(j | Parameter(j,k) <> na,Parameter(j,k))
to exclude 'na’. Note that this will evaluate to 'inf’ if all Parameter(j,k) are equal to 'na’.
Hi @Marcel Hunting. Your suggestion works so far. Thanks a lot!
However, as you have already noted, the problem occurs that for a given k, all parameters (j,k) are equal to 'na' which results in 'inf' for this k. Consequently, this leads to a incorrect result.
How can I exclude in my constraint (see below) that the resulting 'inf' is excluded and only positive values are considered for parameter (j,k)?
Constraint:
Auxiliary Variable >= Parameter(j,k) * Decision Variable (j,k)
Best,
David
Hi @David Kik In the index domain of that constraint you can use
(j,k) | (Parameter(j,k) <> inf) and (Parameter(j,k) <> na)
such that the constraint will not be generated if Parameter(j,k) equals 'inf' or 'na'.
Hi @David Kik
Has Marcel’s suggestions helped you with your question?
Best
@Marcel Hunting Thank you!
@Andrew yes, a lot!
Best
David