How to optimise five equations and four unknowns?

Hi, I am looking to find the optimal power output for four generators given the equations and conditions:
0.31246x1 + 0.15x2 + 0.15x3 + 0.15x4 = 46,
0.15x1 + 0.3x2 + 0.15x3 + 0.15x4 = 40,
0.15x1 + 0.15x2 + 0.3x3 + 0.15x4 = 55,
0.15x1 + 0.15x2 + 0.15x3 + 0.3x4 = 50.5,
x1+x2+x3+x4=200
25<=x1<=100
5.5<=x2<=30
20<=x3<=130
25.5<=x4<=160
To maximise x1, x2, x3 and x4.
Please help.

댓글 수: 2

Torsten
Torsten 2018년 8월 17일
편집: Torsten 2018년 8월 17일
You can only maximize a single value, not four of them (here: x1,x2,x3,x4) simultaneously.
How do I maximise one single value? Do you have an example?

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

 채택된 답변

Alan Weiss
Alan Weiss 2018년 8월 17일
편집: Alan Weiss 2018년 8월 17일

0 개 추천

You have five equations in four unknowns, which means that you probably have no solution to your problem as stated. Consider solving the first four equations:
A = [0.31246 0.15 0.15 0.15
0.15 0.3 0.15 0.15
0.15 0.15 0.3 0.15
0.15 0.15 0.15 0.3 ];
b = [46
40
55
50.5];
c = A\b
c =
48.1346
12.1330
112.1330
82.1330
sum(c)
ans =
254.5337
So you cannot satisfy all of your equations. What would you like to do? Find a least-squares solution? Something else?
Here is a least-squares solution:
A = [A;1 1 1 1];
b = [b;200];
c = A \ b
c =
40.1980
-1.1451
98.8549
68.8549
sum(c)
ans =
206.7627
Alan Weiss
MATLAB mathematical toolbox documentation

댓글 수: 1

How do I maximise one single value? Do you have an example?

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

질문:

2018년 8월 17일

댓글:

2018년 8월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by