How to Control optimizaiton's variable changing step
2 views (last 30 days)
Show older comments
Meddour Aissam riad on 22 Jan 2021
Answered: Alan Weiss on 28 Jan 2021
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 on 28 Jan 2021
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.
MATLAB mathematical toolbox documentation
More Answers (1)
Alex Alex on 28 Jan 2021
Try to create a nonlinear constraint function that selects only integer values of the variables being optimized
Find more on Problem-Based Optimization Setup 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!