Supplying Grad/Jacobian causes solver to think a solver is infeasible?
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!