formulating the objective function for MILP
Mostrar comentarios más antiguos
I have an optimization problem as follows:
Min ((C_1*x_1)+(C_2*x_2)+(C_3*x_3)+(C_4*min(X))).
s.t "some constraints which I don't think they are relevant to my question at this point, All linear of course"
x_1, x_2, and x_3, as well as all "C"s, are scalars
"X" in that last term is a vector. I want to get the minimum value of that vector into the objective function but I couldn't work it out
Any suggestion?
Abdullah
Respuestas (3)
Alan Weiss
el 31 de Ag. de 2016
1 voto
Perhaps you can try solving three different problems, one with C_4 multiplying x_1, one multiplying x_2, and one multiplying x_3. Then take the appropriate solution, the solution that has the multiplier of C_4 as the minimum.
Of course, this might not work, but if it does then I think you are done.
Alan Weiss
MATLAB mathematical toolbox documentation
3 comentarios
Abdullah Almehizia
el 31 de Ag. de 2016
Alan Weiss
el 31 de Ag. de 2016
Editada: Alan Weiss
el 31 de Ag. de 2016
I am not sure that I understand you even now, because you say that this is an MILP, but I see no integer constraints.
Even so, I suppose that you could try using fmincon, but it might not work because the objective is not smooth. I suppose that the constraints that you do not mention keep the problem in a bounded region.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Abdullah Almehizia
el 31 de Ag. de 2016
Editada: Abdullah Almehizia
el 31 de Ag. de 2016
If C_4<0, the problem can be reformulated linearly as follows
Min ((C_1*x_1)+(C_2*x_2)+(C_3*x_3)+(C_4*z)).
s.t. all your original constraints and
z<=x_4
z<=x_5
...
z<=x_8760
As a result of the above constraints, z<=min(X). If C_4<0, this must be satisfied with equality at the optimum, because the optimizer must try to push z as close as it can get to +inf.
If C_4>0, then the solution lies at min(X)=-inf unless you have constraints in place to prevent that. We would have to see those constraints to decide how to modify the above solution.
3 comentarios
Abdullah Almehizia
el 31 de Ag. de 2016
Matt J
el 31 de Ag. de 2016
I can't tell from the code how C_4 would be defined in the actual problem.
Abdullah Almehizia
el 2 de Sept. de 2016
You could use ga() to solve the problem instead of trying to pose it as an MILP, but you would have to eliminate the equality constraints, since ga cannot simultaneously process equality and integer constraints.
You can eliminate the equality constraints from the problem by using them to solve for some of the variables in terms of the others. If you have the patience to read through a really long thread on this, see here
But it's basically very simple. The equalities
Aeq*x=beq
should have Aeq full row rank, otherwise some of your equality constraints are redundant. Since Aeq is full rank, the equalties can be partitioned, possibility after re-ordering the variables, as
[P,Q]*[xp;xq]=beq
where P is a square nonsingular sub-matrix and x=[xp;xq] is a corresponding partition of the unknowns x. Then the sub-partition xp can be written in terms of xq as
xp=P\(beq-Q*xq)
Thus, you can eliminate the variables xp by using the above substitution formula to replace them with an expression in xq everywhere in your problem. This leads to a reformulation of the entire problem in terms of xq only and no equality constraints (just inequalities).
Categorías
Más información sobre Get Started with Optimization Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!