필터 지우기
필터 지우기

hook for an optimization problem.

조회 수: 4 (최근 30일)
Alexander
Alexander 2019년 7월 23일
댓글: Alexander 2019년 8월 10일
Is there a possibility to pass optimization information into the optimzation subject?
I try to explain my question on a basic example: Take
How can I print e.g. the current iteration or the current MeshSize from within the optimizing function?
Sure, printing is not my really issue, there is OutputFcn for this. What I would like to achieve is to alter weights inside the optimizationg function based the current state of the optimization process.

채택된 답변

John D'Errico
John D'Errico 2019년 8월 10일
That is a bad idea.
You want to adjust your objective function in an optimization, based on iteration count, or some other information? Essentially, this creates an objective function that is not a continuous function. Worse, it is not even repeatable, so called a second time at the same location, you won't even return the same value? A really bad idea. And it invalidates the assumptions in essentially any optimization tool.
  댓글 수: 1
Alexander
Alexander 2019년 8월 10일
I see.
Anyway, what I tried as a test a day after I posted was:
I introduced a global variable in a MATLAB source, incremented this along the iteration count, and checked this global var inside my optimization function.
This did not lead to any good behavior. I assume, for the reasons you mentioned. So, I got away from my idea by trying it out.
Thanks, anyway.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surrogate Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by