perform a branch and bound optimization

조회 수: 10 (최근 30일)
Ilde Martino
Ilde Martino 2015년 6월 23일
편집: John D'Errico 2015년 6월 23일
Hi, I need to perform an optimization whose variable is a matrix that has to have only binary values inside (0, 1). To obtain this I tought I could use a branch and bound algorithm, the problem is that I cannot find any optimization function in matlab that can be set with this algorithm. I found this old function on this website,
It would be perfect but once I try to use it it gives me this error
??? Input argument "x0" is undefined.
Error in ==> objfun at 7
It seems that the object function does not "read" the initialized variable x0.
If you could help me performing my optimization with this or any other function I would be extremely grateful (it is for my master thesis)
Thank you in advance
I.
  댓글 수: 1
John D'Errico
John D'Errico 2015년 6월 23일
편집: John D'Errico 2015년 6월 23일
Functions don't "read" variables from your workspace. You need to pass them in. Think about how you use ANY function in MATLAB. Do those functions just magically know how you want to use them, and what you intend to pass in? For example, consider the function mean. You pass in an argument. All functions are the same in this respect.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by