Linear Programming -- Minimizing t

user1234

I am trying to solve the following problem in matlab but facing some difficulty.

Min t
s.t.
t>= 0.0538λ_2 - 0.7071λ_1
t>= λ_1 - 0.3827λ_2
where 0<=λ_j<=1 for j=1,2

This is what I have so far:

f=[0;0;1]  
A=[-0.7071 0.0538 -1;
1 -0.3827 -1]  
B=[0;0]  
ub=zeros(2,1)  
lb=zeros(2,1)  
linprog(f,A,B,[],[],lb,ub);

This problem is taken from a research paper and in that the author solved the above problem and found optimal value of t=−0.12698. I am not getting the correct answer with my implementation. Can someone help me please. Also how can I specify in linprog() that I want to use the simplex method.

Wouter Kuijsters

This should give you the correct result:

f=[1;0;0];  
A=[-1 -0.7071 0.0538;
-1 1 -0.3827]  ;
B=[0;0]  ;
ub=[inf 1 1]  ;
lb=[-inf 0 0]  ;
options = optimset('Algorithm','simplex');
xres = linprog(f,A,B,[],[],lb,ub,[],options);

Note that linprog expects your input in the format:

min x

s.t. Ax <=b

What I did here, is set the vector x = [t l1 l2], so the first entry in your result vector xres corresponds with t. You can set the algorithm using the optimset function.

Also, you set lower and upper bounds for 2 of the 3 variables only, so matlab gave me some warnings in that regard. To be on the safe side, it is usually best to set 'dummy' limits for the unrestricted variables (i.e. here I set the upper limit of t to inf, and the lower limit to -inf). That way, you make sure the right bounds apply to the right variables.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Linear Programming -- Minimizing t

From Dev

Minimizing norm subject to linear constraint, using quadratic programming/minimization in Python

From Dev

Dynamic programming, minimizing cost?

From Dev

struggling minimizing non linear function

From Dev

Why my dynamical programming of fibonacci doesn't give a linear time?

From Dev

Linear programming: Logic condition

From Dev

linear programming with python

From Dev

Linear programming - combining models

From Dev

Linear Programming solvable by MATLAB

From Dev

Matlab: Binary Linear Programming

From Dev

Linear programming: Logic condition

From Dev

Linear programming with power pivot

From Dev

Shortest path linear programming

From Dev

Shift planning with Linear Programming

From Dev

Expressing an OR constraint in linear programming

From Dev

Converting conditional constraints to linear constraints in Linear Programming

From Java

Python Mixed Integer Linear Programming

From Dev

Scipy: Linear programming with sparse matrices

From Dev

Linear Programming (Simplex LP) PuLP?

From Dev

Formulating Linear Integer Programming Constraint

From Dev

Python Pulp Linear Programming Constraint

From Dev

Linear Programming - Question - Python Gekko

From Dev

Network Flow and Integer Linear programming

From Dev

solution of linear programming by R software

From Dev

linear programming with dual simplex in R

From Dev

linear programming algorithm for maximum proceeds

From Dev

Can't Type in input box after minimizing browser

From Dev

Linear Programming: Depict logical expression in a boolean variable

From Dev

Fantasy football linear programming in R with RGLPK

Related Related

HotTag

Archive