linear programming optimization equality constraints
Show older comments
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 Comments
Matt J
on 14 Feb 2018
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
on 14 Feb 2018
Matt J
on 14 Feb 2018
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
on 14 Feb 2018
anu vru
on 14 Feb 2018
Accepted Answer
More Answers (0)
Categories
Find more on Linear Least Squares in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!