MATLAB Syntex Problem for optimization

조회 수: 1 (최근 30일)
Rasel Ahmed
Rasel Ahmed 2020년 9월 17일
답변: Ayush Gupta 2020년 10월 8일
Hi Everyone,
I am working on LNG plant optimization and using Matlab and Hysys as optimization and process simulation software and I have interfaced them using a spreadsheet.
Now, Hysys calculates values of variables x1, x2, x3, x4 and send to MATLAB, which optimizes them and send back the values to Hysys.
The sum of these four variables should be equal to one, that is x1+x2+x3+x4=1, that is if value of x1 is reduced by MATLAB then the values of remaining variables should be increased to make the sum equals 1.
I am not figuring out a way to correctly write in MATLAB. How should I formulate it?
Looking forward to your help.
Thanks.
  댓글 수: 2
John D'Errico
John D'Errico 2020년 9월 18일
Did you try fmincon? How about GA? Do you have either the optimization toolbox, or the global optimization toolbox?
Rasel Ahmed
Rasel Ahmed 2020년 9월 18일
Thank you sir John for your comment. Yes, I have GA, PSO codes and also have matlab toolbox. I tried to build the constraint in many ways but I can't find a way to properly state the constraint in Matlab.

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

채택된 답변

Ayush Gupta
Ayush Gupta 2020년 10월 8일
The MATLAB’s optimization toolbox can be used to solve this problem. We can define a problem using optimproblem function in MATLAB. Then we can declare optimal variables that will be used in the problem with optimvar function. After that we define the objective that is the variable that we want to optimize and constraints it has like we have the constraint of sum to be 1. To refer how to solve a problem, look at the Problem-Based Optimization Workflow here.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by