Updating constraints in fmincon at while loop
Show older comments
Hello everyone ,
I have a script for Sequential Linear Programming method and i need to add one more constraint to the set of constraints that i have after every iteration.
Then i apply the new minimization problem to fmincon with handle @ .
I can't find a way to update the set of contraints and the only way i found is to do it manually at the end of every iteration.
Do u know a way i can make it full automatic so i dont stop at every iteration ?
One thought was to write all the constraints to a .txt file , update it at the end of iteration , then reading from it, somehow save the text i got from .txt to a new .m file and then apply it with @ to the fmincon.
Any ideas on how i can make that possible ?
Thanks in advance !
2 Comments
Walter Roberson
on 7 Sep 2019
If you are using Linear Programming, then are the new constraints linear inequality constraints? If so then just append them to the A and b matrix. For linear equality constraints, just append them to the Aeq and beq matrix.
If they are non-linear constraints, then what form do they take?
Bill Pap
on 8 Sep 2019
Accepted Answer
More Answers (0)
Categories
Find more on Support Vector Machine Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!