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!