How can i use simplex algorithm for optimization of linear eqautions using linprog in MATLAB 2007b?
Show older comments
I am trying to use simplex algorithm to optimize a linear equation depending upon one inequality constraint and an equality constraint using options as mentioned in MATLAB help as below
options=optimset('Largescale','off','Simplex','on');
f=(A,b,aeq,beq,options);
where A is the matrix of coefficients(fc)=[-1 0.1 fc fc.^2]
b=-0.3
aeq=[0 1 1 1;0 1 0 0]
beq=[1;0]
The problem optimizes without using simplex algorithm while using Simplex algorithm as mentioned above MATLAB shows an error that linprog accepts only input arguments of type 'double'.As mentioned in workspace all input arguments are of type double except 'options' which is of type struct.How can I solve the above problem? Please reply Thanks
Answers (2)
Torsten
on 30 Mar 2015
0 votes
What so you mean by "optimize a linear equation" ? Find a feasible point ?
Best wishes
Torsten.
Naina Kathuria
on 30 Mar 2015
0 votes
1 Comment
Torsten
on 30 Mar 2015
So you try to find a point (a,b,c,d) that satisfies
-a+0.1*b+(fc)*c+(fc^2)*d <= -0.3
b+c+d=1
b=0
?
Choose a=fc^2+0.3,b=0,c=0,d=1.
Best wishes
Torsten.
Categories
Find more on Linear Programming and Mixed-Integer Linear Programming 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!