Hi,

My name is Zvonko Bregar.

Please help me with the following problem.

There is a real variable P having disjunct definition area {0} + [PMIN, PMAX].
There is also a binary variable X helping in this definition.
If X = 0 then P = 0
And if X = 1 then PMIN < P < PMAX.
So variables X an P work simultaneously.
This should be a rather standard construction.

The question is to construct another variable, say R, from X an P
Such that
If X = P = 0 then also R = 0
Else R = min {P-PMIN,PMAX-P}

In other words, R measures the minimal distance of P to its boundaries PMIN and 
PMAX.
But if P = 0 then R must be set to 0 too.

For example, if PMIN = 200 and PMAX = 400, than the required function should be 
something like the "upside down" absolute value function:

R =  - | P - 300 | + 100  if 200 < P < 400

But also R = 0 if P = 0.

I have been trying this for quite some time but didn't succeed. It looks simple 
and perhaps there is a simple solution? Or perhaps this cannot be done at all?

Thank you

OPOZORILO: To elektronsko sporo?ilo in vse njegove morebitne priloge lahko 
vsebujejo zaupne in/ali privilegirane informacije, ki so last Elektroin?tituta 
Milan Vidmar in so namenjene izklju?no naslovniku. ?e ste sporo?ilo prejeli 
pomotoma zaradi napake v naslovu ali pri prenosu sporo?ila, Vas prosimo, da nas 
o tem obvestite s povratno po?to. V tem primeru vsebine prejetega sporo?ila ne 
smete uporabiti, kopirati, tiskati, objaviti ali distribuirati, ampak ga morate 
takoj uni?iti.

DISCLAIMER: This e-mail is for the intended recipient only. It contains 
proprietary information some or all of which may be legally privileged. If you 
received this e-mail by mistake please notify us by replying to this e-mail. 
Consequently, the contents of this e-mail must be deleted and not be used, 
copied, printed, disclosed or distributed.

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to