optimization technique problem with different outputs

조회 수: 1 (최근 30일)
rajesh kumar
rajesh kumar 2020년 3월 7일
댓글: Walter Roberson 2020년 3월 7일
i am doing one optimization technique as there is a randomness in the technique i getting new value as a output every time some times repeated value if i run for 20 times i getting 20values some may be same now which value i need to choose correct value. is there any tool in matlab or any code to justify my problem?
  댓글 수: 5
Ameer Hamza
Ameer Hamza 2020년 3월 7일
Walter's answer explains the computational aspect of this issue. However, this might be the case that the system is underdetermined, and there are potentially infinite solutions to your optimization problem, each giving exactly the same optimal value. If this is the case, then you can consider adding some more constraint considering the underlying problem you are trying to solve. Anyway, the justification of a solution will depend on the problem you are trying to solve. If you just want to get a unique solution every time you run the code, you can just add
rng(0)
at the beginning of your code to seed the random number generator with the same value. You will get the same solution every time.
Walter Roberson
Walter Roberson 2020년 3월 7일
If you do find multiple solutions that are bit-for-bit identical in optimal function value, then in some cases you just pick one arbitrarily for illustration purposes; and in other cases you need to find the entire set of solutions or a formula to generate the entire set. In other cases for illustration you want to find the first few solutions for plotting purposes, where "first" typically refers to those with smallest positive independent variable to make it easier to plot. But if you are faced with something like sinc wave with infinite oscillations near 0 then your only "justification" for picking some has to do with giving nice separation in a low resolution diagram.

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

답변 (1개)

Walter Roberson
Walter Roberson 2020년 3월 7일
About the only test that can justify one optimization result compared to another, is to compare the value of the objective function, and choose the configuration that leads to the minimum or maximum as appropriate.
  댓글 수: 2
rajesh kumar
rajesh kumar 2020년 3월 7일
if there is no comparison with other method now how can i justify my answer, every time i am getting global value which value i need to select, is there any method or concepts or any matlab tool
Walter Roberson
Walter Roberson 2020년 3월 7일
By the way, if the question is which optimization technique is the best, then you need to define carefully what "best" means. If you have an optimization technique that produces a solution to (say) 45 bits accuracy in (say) 3 seconds, and you have a different technique that produces a solution to 48 bits accuracy (roughly one more decimal place) in (say) 3 hours, then which is best? How much extra time are you prepared to spend for each extra bit of accuracy?

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

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by