How to use CVX in matlab code?
이전 댓글 표시
Hello!
I am new to cvx, I have no idea how to use it.
I hope you could help me.
I want to optimize the UAV trajectory, I have several variables that I have to calculate before getting the optimal trajectory which are related to the location of the UAV.
I wonder if I should run my program in matlab first with a fixed point of the UAV location, then apply CVX to find the optimal points?
Thanks in advance,
답변 (1개)
Torsten
2022년 11월 13일
1 개 추천
Use intlinprog.
No need to linearize anything - your equations are linear in the unknowns.
댓글 수: 12
Safia
2022년 11월 13일
Torsten
2022년 11월 13일
Show us your real case. In the above, nothing needs to be linearized.
What are given data in your model ? What is to be determined ?
Constraints (1) and (2) look strange. The first constraint must be wrong since only one u_ij is present without further reference to i or j. In the second constraint, the u_ij should be inside the sum, shouldn't they ?
Torsten
2022년 11월 14일
Use intlinprog. As far as I can see, the problem can be solved by a normal linear mixed-integer optimizer.
Safia
2022년 11월 14일
Safia
2022년 11월 14일
I have no experience with cvx - so I cannot tell you.
I answered because I don't see why you would need a solver different from "intlinprog". And until now, you couldn't show me a part of the model where "intlinprog" would not be sufficient for a solution.
So if you insist on cvx as solver - for whatever reasons - you should open a new question.
Or try a YouTube Video:
Safia
2022년 11월 14일
I don't see from your model how X influences R. If X is also a solution vector and influences R(t), you will have to use "ga" instead of "intlinprog" since your problem becomes nonlinear.
So define X(1),...,X(T) as solution variables - then you have values in the course of the optimization to calculate R(1),...,R(T) in the "nonlcon" function of "ga".
카테고리
도움말 센터 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
