General Optimization Question -- Linear Programming

1 view (last 30 days)
I am trying to learn optimization techniques using linear programming and have a general question. Say I were to have to linear functions:
x1 = linspace(3,10,100);
x2 = linspace(1,8,100);
y1 = 0.6*x1;
y2 = x2 + 7;
utility_high = min(y2(end),y1(end));
utility_low = max(y2(1), y1(1));
utility = utility_high - utility_low;
My goal is to optimize the utility by increasing the intercept of the bottom function y1. However, I would like to set a constraint that defines the minimum x difference between the two lines at some value epsilon. Essentially, the bottom line cannot come to within delta x = epsilon at any y value. How could I write this using linprog?
  1 Comment
Seth DeLand
Seth DeLand on 9 Jan 2012
Hi David,
I want to make sure that I understand your constraint correctly. When you say that the bottom line cannot come to within epsilon of the top line at any value y, do you mean that it cannot come to within values of epsilon on the range of the values you've defined in x1 and x2? I'm assuming this is the case because if you don't limit the range over which this constraint is valid, you would end up with it being violated at some point unless the 2 lines are parallel.
If the constraint is only valid over a certain range, I'm not certain this is still a linear programming problem.

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!