How to observe parameter value existing in constraint while solving problem using "ga"

3 ビュー (過去 30 日間)
Maria
Maria 2023 年 3 月 14 日
編集済み: Maria 2023 年 3 月 15 日
Hello! I know I'm tiring you with my questions about the same problem over and over again, but I really tried without finding the right solution, that's why i posted here to get some help. I solved my optimization problem using "ga" which has two constraints. In order to evaluate the parameter related to one of these constraints, I want to observe the value of this parameter or extract its final value after solving the problem.
I always appreciate your effort that you have contributed to solve my problems.
Best regards,

回答 (1 件)

Torsten
Torsten 2023 年 3 月 14 日
Add the line
left_hand_side = E_prop + cumsum(sol.S.*(sum(Energy_Pr,2)))
after the solution has been obtained.
  1 件のコメント
Maria
Maria 2023 年 3 月 15 日
編集済み: Maria 2023 年 3 月 15 日
@Torsten i find a solution , thank you for your reply!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by