How to impose multiple inequality constraints on fmincon?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How should I provide two inequality constraints as:
A1*x < b1
A2*x < b2
where the syntax is like this:
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options)
My mathematical constraint is this, actually:
-B < x(i+1)-x(i) < B
0 commentaires
Réponse acceptée
Titus Edelhofer
le 13 Sep 2012
Hi,
for the left hand side, you multiply by -1, i.e.,
-x(i+1) + x(i) <= B
And combining is easy:
A = [A1; A2];
b = [b1; b2];
Titus
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!