[Ipopt] round(x,n) in objective function
Novalio Daratha
novatha at gmail.com
Thu Jun 7 03:22:01 EDT 2012
Dear Mr. Hans Pirnay,
thanks a lot for your reply.
I have discrete variables in the beginning. They represent switch position.
They are relaxed into continuous variables. Hence my problem now an NLP
which Iopt solves very well. It is important in practice to limit number of
switching i.e. change of discrete values. SO i want to convert the
continuous result into discrete values and calculate the number of
switching.
I used expression similar to the following
for example I have x (t) which can have any value in XSL
XSL = {0.0, 0.01, 0.02, 0.03, 0.04, 0.05}
I then convert x into continuous variable. Run an NLP using Iopt then get
an optimum value, for example.
x(t) = 1 0.003 0.027 0.049
Initially I want to get the closest discrete values.
x_round(t) = round(100*x(t))*0.01
then I can define number of switching
var switch_switch = sum {t in TIME} (x_round(t) - x_round(t-1))*100
Then I need to limit x round:
switch_number <= LIMIT;
In electrical power system, any switching has some cost associated with it.
Therefore it is favorable to minimize or limit it.
I look forward for your favorable reply.
Best regards,
Novalio Daratha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120607/115442cf/attachment.html>
More information about the Ipopt
mailing list