salman presentation

download salman presentation

of 10

Transcript of salman presentation

  • 8/3/2019 salman presentation

    1/10

    By

    Salman Aziz

    Mohammad Abbas

    Uzair waqar siddique

  • 8/3/2019 salman presentation

    2/10

    (LP, or linear optimization) is a mathematicalmethod for determining a way to achieve the bestoutcome (such as maximum profit or lowest cost) in agiven mathematical model for some list ofrequirements represented as linear relationships.

    Linear programming is a specific case of mathematicalprogramming (mathematical optimization).

  • 8/3/2019 salman presentation

    3/10

    A linear program is infeasible if there exists nosolution that satisfies all of the constraints -- in otherwords, if nofeasible solution can be constructed.

    Since any real operation that you are modeling mustremain within the constraints of reality, infeasibilitymost often indicates an error of some kind.

    Simplex-based LP software like lp_solve efficiently

    detects when no feasible solution is possible.

  • 8/3/2019 salman presentation

    4/10

    The source of infeasibility is often difficult to trackdown.

    It may stem from an error in specifying some of the

    constraints in your model, or from some wrongnumbers in your data.

    Upon detecting infeasibility, LP codes typically showyou the most recent infeasible solution that they have

    encountered.

  • 8/3/2019 salman presentation

    5/10

    A useful approach is to forestall meaninglessinfeasibilities by explicitly modeling those sources ofinfeasibility that you view as realistic.

    As a simple example, you could add a new "slack"variable on each capacity constraint, having a veryhigh penalty cost.

    Then infeasibilities in your capacities would be

    signalled by positive values for these slacks at theoptimal solution, rather than by a mysterious lack offeasibility in the linear program as a whole.

  • 8/3/2019 salman presentation

    6/10

    So in practice, if a constraint is a < constraint, add avariable to the model and give it for that constraint a -1coefficient for that variable.

    In the objective you give it a relative large cost. If a

    constraint is a > constraint, add a variable to the modeland give it for that constraint a +1 coefficient for thatvariable.

    In the objective you give it a relative large cost. If a

    constraint is an equal constraint, add two variables tothe model and give it for that constraint respectively a-1 and +1 coefficient for that variable.

  • 8/3/2019 salman presentation

    7/10

    In the objective you give them a relative large cost.

    Or you only add one variable and give it an -infinitelower bound.

    To make sure that these added variables only get non-zero values when the constraint is violating, the valuein the objective must be relative large.

    Like that this variable gets a penalty cost and it will

    only become non-zero when really needed.

  • 8/3/2019 salman presentation

    8/10

    min: x + y;

    c1: x >= 6;

    c2: y >= 6;

    c3: x + y

  • 8/3/2019 salman presentation

    9/10

    min: x + y + 1000 e1 + 1000 e2 + 1000 e3; c1: x + e1 >= 6; c2: y + e2 >= 6; c3: x + y - e3

  • 8/3/2019 salman presentation

    10/10

    With this simple example model, multiple solutionswere possible. Here, the first constraint was relaxedsince e1 is non-zero. Only this one constraint had to berelaxed to make the model feasible. The objectivevalue of 1011 isn't saying very much. However if wesubtract 1000 e1 + 1000 e2 + 1000 e3 from it, then itbecomes 11 which is the value of the original objectivefunction (x + y).