Supplying Grad/Jacobian causes solver to think a solver is infeasible?
5 views (last 30 days)
Show older comments
I'm easing my way into optimization and so I've created a scheduling problem (MINLP) that slowly getting more complex. It solves fine (with the Bonmin solver - I'm using the Opti toolbox because I wasn't too happy with the Matlab's GA's solutions) when I don't supply the jacobian or gradients, but if I do it fails and claims the problem is infeasible?
I must be doing something wrong...
I'm generating the derivatives with the symbolic math toolbox like so:
% Gradient
symGrad = jacobian(totCost);
grad = matlabFunction(symGrad,'vars',{X});
% Jacobian
symJac = jacobian(nlCon);
jac = matlabFunction(symJac, 'vars',{X});
Is there a better way to do it?
It's a very simple problem where I'm trying to schedule 3 generators over 10 time steps while minimising cost. The constraints are that they can be throttled between 70-100%, or be switched off completely.
Also just a shout-out to Jonathan Currie. You're a champ! Opti is a great tool
0 Comments
Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox 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!