From: "Petros " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Optimization using Heaviside function
Date: Sun, 13 Jun 2010 18:43:03 +0000 (UTC)
Organization: NTUA
Lines: 11
Message-ID: <hv38rn$sfv$>
References: <hv34vv$91u$> <hv37q2$psk$>
Reply-To: "Petros " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1276454583 29183 (13 Jun 2010 18:43:03 GMT)
NNTP-Posting-Date: Sun, 13 Jun 2010 18:43:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2070102
Xref: comp.soft-sys.matlab:644595

Thanks for replying. Really the function is not that one. The real function is a 2-variable function with quadratic parts and heaviside functions. I just wanted to start with something simpler. I cannot avoid the heaviside functions unfortunately, because they represent decisions made by a controller. So, the functions are

P={a if 0<x1<5; b if 5<x1} and
Q={c if 0<x2<19; d if 19<x2} and
L=(Q-P-Q0)*FINE(Q-P-Q0) where 
FINE(Q-P-Q0)={e if 0<(Q-P-Q0)<100; f if 100<(Q-P-Q0)<200}

And I try to maximize (Q-P-L) or minimize -(Q-P-L).
It's not something I can do by hand for repeated problems and I thought matlab could help me out.

Thanks again.