Dear Mr. Hans Pirnay,<div><br></div><div>thanks a lot for your reply.</div><div><br></div><div>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.</div>
<div>I used expression similar to the following</div><div><br></div><div>for example I have x (t) which can have any value in XSL</div><div><br></div><div>XSL = {0.0, 0.01, 0.02, 0.03, 0.04, 0.05}</div><div><br></div><div>
I then convert x into continuous variable. Run an NLP using Iopt then get an optimum value, for example.</div><div><br></div><div>x(t) = 1 0.003 0.027 0.049</div><div><br></div><div>Initially I want to get the closest discrete values.</div>
<div><br></div><div>x_round(t) = round(100*x(t))*0.01</div><div><br></div><div>then I can define number of switching</div><div><br></div><div>var switch_switch = sum {t in TIME} (x_round(t) - x_round(t-1))*100</div><div>
<br>
Then I need to limit x round:</div><div> switch_number <= LIMIT;</div><div><br></div><div>In electrical power system, any switching has some cost associated with it. Therefore it is favorable to minimize or limit it.</div>
<div><br></div><div>I look forward for your favorable reply.</div><div><br></div><div>Best regards,</div><div><br></div><div>Novalio Daratha</div>