optimization problem using optim prob in matlab

조회 수: 2 (최근 30일)
Omer Hassan
Omer Hassan 2019년 12월 1일
답변: Dhananjay Kumar 2019년 12월 4일
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에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by