Question: Insert IF statement in MINIMIZE optimization

Hello to everyone!

I should MINIMIZE a function called α that is a function of the variable h (0 < h < 2.2), therefore I should find the h value that gives the minimum value of α. Here follows the α function:

alpha= ((W1*t/2)+(W2+N)*(t+t/2*h/(h_TOT-h)))/(W1*h/2 + W2*h/2)

 The terms W1 and W2 are constant and assume precise values as a function of h. Simplifying (I will use very simple condition, in reality, the statement is more complicated):

  • if 0<h<1, then W1:=1; W2:=3
    elif 1<h<2.2, then W1:=2, W2:=4
    end if;

How do I collect the IF statements inside the MINIMIZE optimization to obtain a final h value?

I hope I was clear! 

Thanks you all,

Michele

Please Wait...