fmincon for optimal solution
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everyone,
I have a question about optimization as follows:
the object is to maximize sum_F=(F(1)^2+F(2)^2+F(3)^2)
However, it subjects to these constraints:
1. A*lambda=B-C*F;
2. torque=D-E*lambda;
3. the absolute value of each element in torque <=max_torque;
4. G1(torque)<=120;
5. G2(torque)<=120;
6. G3(torque)<=200;
7. G5(torque)<=200;
where
A is a 4*6 matrix,
lambda is a 6*1 vector,
B is a 4*1 vector,
C is a 4*3 matrix,
F is the 3*1 vector,
both torque and D are the 6*1 vector,
E is the 6*6 matrix,
and F is the unknown variable, whose three elements are to be maximized,
A,B,C,D and E are all known variables, lambda is the intermediate variables.
G(1) ~ G(5) are five scalars which are the functions of torque. Because of the complex relations in the constraint 1 and 2, G(1)~G(5) cannot be expressed by F directly, and they are expressed by torque.
anyone knows how to solve it in matlab ? Can it be solved by fmincon?
THX very much!
댓글 수: 0
채택된 답변
Brian B
2014년 7월 11일
So F, lambda, and torque are the variables, correct? Define
x = [F; lambda; torque].
Then you can rearrange constraints (1)-(2) so they take the form M*x = b. The constraints (3) are simple bounds. The remaining constraints are apparently nonlinear. fmincon can solve this kind of problem.
You might be able to simplify the problem easily. Is the matrix E invertible? If so you can solve constraint (2) for lambda and substitute the result into (1). This eliminates the variables lambda while keeping (3) as simple bounds. If |E is singular, you can eliminate torque. In this case (3) turns into a set of linear inequalities. In all cases, fmincon is applicable.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!