optimization problem using optim prob in matlab

1 次查看(过去 30 天)
How can I restrict the optim problem at matlab to produce integers or binary values only? I tried to use binary() operator but it didn't accept it ?
  1 个评论
Vladimir Sovkov
Vladimir Sovkov 2019-12-1
When you create an optimization variable with the function optimvar of the Optimization Toolbox, you have an option to choose its type as integer and declair its boundaries.

请先登录,再进行评论。

回答(1 个)

Dhananjay Kumar
Dhananjay Kumar 2019-12-4
While using optimvar to create variables which would be used in optimization problem constraints, you can specify 'Type' as 'integer' to achieve your purpose.

类别

Help CenterFile Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by