linear programming optimization equality constraints
이전 댓글 표시
hello, i am trying to do linear programming. and i am trying to find the minimum of my objective function.
i have attached the code. and my problem statement is also attached. i keep getting error for my equality constraints i tried every possible way known to me to solve. still couldn't fix it if anyone could suggest a way, it would be really helpful thank you
댓글 수: 8
Matt J
2018년 2월 14일
The problem in your problemstatement.txt is pretty absurd (so I'm wondering if there is a mistake). The objective function is constant over the constrained region, so all feasible points (if any exist) are optimal.
anu vru
2018년 2월 14일
Matt J
2018년 2월 14일
In your problem statement document, pv, pw, and L appear to be scalars, yet in your code they are vectors. You need to help us reconcile that. Are you solving a separate sub-problem for every pv(i), pw(i), l(i) or something else?
In any case, the problem as written is absurd because as I said, all choices of x(1) and x(2) are equally optimal. Your constraint
(pv*x(1)+pw*x(2))=L
assures that the objective function
f(x)=(pv*x(1)+ pw*x(2))
is a constant f(x)=L over all feasible x.
For the second part... I need to do (PV+pw-L) this is my objective...
What happened to the x(i)'s?
but my L is constant..I cannot vary that....for that that L I need values for Pv and PW...such that pv+pw-L=0 or atleast close to Zero
You need Pv and PW? But in your code, they are given constants!
anu vru
2018년 2월 14일
anu vru
2018년 2월 14일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Least Squares에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!