optimization problem using optim prob in matlab

1 vue (au cours des 30 derniers jours)
Omer Hassan
Omer Hassan le 1 Déc 2019
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 commentaire
Vladimir Sovkov
Vladimir Sovkov le 1 Déc 2019
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.

Connectez-vous pour commenter.

Réponses (1)

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

Catégories

En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by