1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Linear programming?

  1. Nov 4, 2004 #1
    2 train-lines leave the same central station at the same time.
    line 1: [itex]f(x) = 6000 + 50x[/itex]
    line 2: [itex]g(y) = 2000 + 50y[/itex]

    x and y are the number of departures pr. hour. line 1 can have 2 departures pr. hour pr. trian, and line 2 can only have 1 departure pr. hour pr. train.
    There is a total of 100 trains.

    I'm supposed to show this graphically.

    I have:
    [itex]x + y \geq 100[/itex]
    Since line 1 can have 2 departures pr. hour. pr. train, I also have:
    [itex]f(x) = 6000 + 50(2)x[/itex]

    But, I'm confused on how I show this graphically? What do I need to plot here?

    Plotting f(x) and g(y) doesn't make any sense at all.
     
    Last edited: Nov 4, 2004
  2. jcsd
  3. Nov 4, 2004 #2

    NateTG

    User Avatar
    Science Advisor
    Homework Helper

    Are you sure you don't want [tex]x+y \leq 100[/tex]?

    Are you sure that the equations are really what you represent them as in general - It seems like [tex]f(x)[/tex] and [tex]g(y)[/tex] might be the number of people each train handles, with [tex]x[/tex] and [tex]y[/tex] the number of departues of that type of train.

    So, let's say that [tex]t_1[/tex] and [tex]t_2[/tex] are the numbers of each type of train. Then you have:
    [tex]t_1+t_2 \leq 100 [/tex] - The number of trains is limited
    [tex]t_1\geq 0[/tex] - It's impossibe to have fewer than 0 trains
    [tex]t_2\geq 0[/tex]
    The feasible region should be a triangle, with two sides along the axes.

    And I'll guess that you're going to maximize
    [tex]p=f(x)+g(y)=6000+50 t_1 + 2000 + 2 (50) t_2=8000+50t_1+100t_2[/tex]
     
  4. Nov 4, 2004 #3
    Ah, that helps. I'll see what I come up with this.

    thanks alot :)
     
  5. Nov 4, 2004 #4
    Hm, I misunderstood.

    Each train can hold 150 passagers. You need to show graphically which combinations of x and y that can handle all the passengers that wants to take the train.
    The amount of passengers that wants to take the train are given by f(x) and g(x).

    So, this amounts to:

    [itex]f(x) = \frac{6000 + 100x}{150}[/itex] (There are 2 departures for each departure in g(x).)

    [itex]g(x) = \frac{2000 + 50x}{150}[/itex]

    Wouldn't this be correct? I'm not sure how the unequalities would look like though.
    [itex] x + y \leq 100[/itex]

    [itex]40 + \frac{1}{1.5}x \geq ?[/itex]

    [itex]\frac{20}{1.5} + \frac{10}{3}x \geq ?[/itex]
     
    Last edited: Nov 4, 2004
  6. Nov 4, 2004 #5

    NateTG

    User Avatar
    Science Advisor
    Homework Helper

    I'm sorry, but I can't really follow your last post.

    Let's say, for a moment that the number of people that want to ride train [tex]t_x[/tex] is
    [tex]f(x)=6000+100x[/tex] where [tex]x[/tex] is the number of trains, then, in order for the trains to meet the demand the number of people that can ride the trains must be larger than the demand:
    [tex]2 \times 150 \times x[/tex]
    is the number of people that train route [tex]t_x[/tex] can handle per hour based on two departures per train per hour. An that must be larger than the number of people that want to ride trains on that route so
    [tex] 2\times 150 \times x \geq f(x)=6000+100x[/tex]
    [tex]300 \times x \geq 6000 + 100x [/tex]
    [tex]x \geq 30[/tex]

    The inital stuff might not be set up right, so you'll have to check it out. You'll do a similar thing for y, and then the [tex]x+y \leq 100[/tex] condition.
     
  7. Nov 4, 2004 #6
    Ah, yes, this makes sense. Thanks :)

    Now I've stumbled upon another problem, which probably isn't to related to this forum. I'll ask anyway.
    How do I plot this with gnuplot?
    I have:
    [itex]x + y \leq 100[/itex]
    [itex]x \leq 24[/itex]
    [itex]y \leq 20[/itex]

    I can plot the first and the last with:
    plot 100 - x, 20

    But, how do i plot x = 24?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Linear programming?
  1. Linear programming (Replies: 7)

  2. Linear Programming (Replies: 3)

  3. Linear Programming (Replies: 1)

Loading...