MATLAB Answers

How to Control optimizaiton's variable changing step

1 ビュー (過去 30 日間)
Meddour Aissam riad
Meddour Aissam riad 2021 年 1 月 22 日
回答済み: Alan Weiss 2021 年 1 月 28 日
Hi mathworks Heroes !
I was wondering if there is any way to adjust the optimized variables step changement,because i want to optimize a variable that can only change by a decimal degit (1,2,3,4,5....) .
i'am using optimization Toolbox (Fmincon)
thanks in advance


Alan Weiss
Alan Weiss 2021 年 1 月 28 日
Unfortunately, fmincon does not accept integer constraints. If your problem has an approximately quadratic objective, you can try using intlinprog along the lines of this example. Otherwise, the only solvers we offer for mixed-integer nonlinear programming are genetic algorithm and surrogate optimization solvers in Global Optimization Toolbox.
Alan Weiss
MATLAB mathematical toolbox documentation

その他の回答 (1 件)

Alex Alex
Alex Alex 2021 年 1 月 28 日
Try to create a nonlinear constraint function that selects only integer values of the variables being optimized

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by