I am working on an optimization problem and it has a user defined objective function. the problem is now working well with a simple cost objective function, but I am not able to change it to the attached picture;
The e(t) is a an unknown variable of the problem which is a vector of symbolic variables for 24 hours like [e1,e2,e3,e4,…,e24]. Pb and Qb are also the same. Could you please help me to find out how can I define such objective function in julia which has maximum and minimum functions simultaneously! I was trying to use findmax() for finding the maximum variable but it is not working well and it is mentioned that the method is not matched.
I am using Ipopt.Optimizer!
Thanks in advance for your kind support.
To model min { max_{t in T} f(t)}, you can use the trick
T = 3
model = Model()
@variable(model, f_t[1:T])
@variable(model, f_t_max)
# Assume f_t[t] is defined by other constraints
@constraint(model, [t=1:T], f_t_max >= f_t[t])
@objective(model, Min, f_t_max)
you can use that for your two max terms. Then the -min f(x) term can be converted into max -f(x).