help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Can I simulate step function in GLPK?


From: Michael Hennebry
Subject: Re: [Help-glpk] Can I simulate step function in GLPK?
Date: Thu, 2 Sep 2010 10:44:31 -0500 (CDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Wed, 1 Sep 2010, xiaomi wrote:

Thanks, Michael. I am sorry there are several typo in my original statement. Let me recify it as follows:
for example: step function y=u(5);
maxmize y
y<=M(x-5) , where M is a large number to simulate sharp slope.
y<=1;

The only wired thing is that when x<5, y will be y <= a number that is negative. However if y is nongative as default, can this property restrict y to be 0 when x<5? (without binary)

No.
If M(x-5) must be less than zero,
the problem described is infeasible.
You'll need to make y binary.

--
Michael   address@hidden
"Pessimist: The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be."



reply via email to

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