1 / 34

Applied Integer Programming

Applied Integer Programming. McCarl and Spreen Chapter 15. Why Integer Programming?. In standard LP, variables are continuous. Fractional solutions are not always acceptable (e.g. machine purchases). Integer programming can also be used to model discrete choices (either/or situations).

kylene
Download Presentation

Applied Integer Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Applied Integer Programming McCarl and Spreen Chapter 15

  2. Why Integer Programming? • In standard LP, variables are continuous. • Fractional solutions are not always acceptable (e.g. machine purchases). • Integer programming can also be used to model discrete choices (either/or situations). • Integer programming can also be used as a method to model non-linearities.

  3. Pure-Integer Programming If all the variables are integers, we have a "pure integer program." These are unusual in agricultural economics applications.

  4. Examplefrom Hillier and Lieberman A company is considering expansion. It can build a new factory in Los Angeles or in San Francisco, or in both places. It can also build, at most, one new warehouse but only in the city where a new factory is built.

  5. Net Present Values and Capital Requirements of Investments Capital Available $10 million

  6. LP Tableau Problems of this sort (0-1 variables) are sometimes called "binary integer programs" or BIPs.

  7. Solution via Solver In the constraints section, you can specify which variables are integers.

  8. Mixed Integer Programming In Mixed Integer Programming (MIP), some variables are integers while others are continuous. These applications are more common than pure integer programming in agricultural economics.

  9. Fixed Cost Example X: continuous number of goods produced Y: 0-1 variable indicating whether fixed costs are incurred C: per unit revenue of producing X F: fixed cost incurred if at least one unit of X is produced M: a suitably large number.

  10. General Form Max CX – FY s.t. X – MY LE 0 X GE 0; Y binary (e.g. 0 or 1) The constraint on X will not be binding if Y is 1 (and this problem, absent other constraints will be unbounded). The constraint will force X=0 if Y=0.

  11. Machine Size Selection In this example, you can purchase any number of whole machines (1, 2, 3 etc), limited by capital. In this case, labor is the most limiting resource and the solution is to obtain machine 3 and produce 2286 items.

  12. Logical Conditions • Conditional Use – A warehouse can only be used if constructed • Complementary Products – If any of product A is produced, then a minimum quantity of B must be produced • Complementary Equipment – If a particular class of equipment is purchased then only complementary equipment can be acquired • Sequencing – Operation A must be entirely finished before operation B can begin

  13. Indicator Variables Indicator variables are binary variables – e.g. variables that can take the values 0 or 1. If a particular choice is made, the variable takes the value 1. If not, the variable takes the value 0. If the indicator variable takes the value 0, then other activities must also be zero. If the value is 1, then these variables can be non-zero and will be limited by other constraints in the model.

  14. "Large M Technique" To make a restriction that either sets a certain class of variables equal to zero or is non-binding, depending on the value of an indicator variable, we specify: X1 + X2 + X3 + . . .XN LE M*I(0,1) If I takes the value 0, then all these X must also equal 0. If I takes the value 1, then X will not be restricted by this constraint.

  15. Either-Or Active Constraints Suppose only one of a pair of constraints is allowed to be active. Either A1*X LE b1 OR A2*X LE b2 A1X – MY LE b1 A2X + MY LE b2 + M where Y may be either 0 or 1. If it is 0, the first constraint is active. If it is 1, the second constraint is active.

  16. Aside on Mutual Exclusivity An alternative way to specify mutual exclusion is: A1X – MY1 LE b1 A2X – MY2 LE b2 Y1 + Y2 = 1 This formulation usually solves faster and can be easier to interpret for some decisions.

  17. Multiple Active Constraints A1X – MY1 le b1 A2X – MY2 le b2 . AkX – MYk le bk Yi = K-P Where P is the number of constraints allowed to be active

  18. Conditional Restrictions All zero values in one group of variables (X) might imply all zero values for another group of variables (Y): Xi – MZ le 0 Yk – RZ ge 0 Z is a binary variable

  19. Discrete Levels of Resources In some situations, the choice to get involved in a particular activity may involve distinct choices in levels of involvement. Example: A farmer has 3 fields (of sizes F1, F2, and F3) and two crop alternatives. If an enterprises is started on a field, the entire field must be devoted to it. (No splitting fields between both enterprises.)

  20. Algebraic Representation of Discrete Levels of Resources X1 = F1Y1 + F2Y2 + F3Y3 OR X1 – F1Y1 – F2Y2 – F3Y3 = 0 (acreage planted to crop 1) X2 = F1(1-Y1) + F2(1-Y2) +F3(1-Y3) OR X2 + F1Y1 + F2Y2 + F3Y3 = F1 +F2+F3 (acreage planted to crop 2) The Yi are binary indicator variables.

  21. Distinct Variable Values Some variables can only take certain values (i.e. a variable restricted to 2, 4, or 12) X – V1Y1 – V2Y2 – V3Y3 = 0 Y1 + Y2 + Y3 = 1 With each Y1 a binary variable (0-1)

  22. Nonlinear Representations Let Z be the product of two binary variables, X1 and X2, so that Z = X1*X2 -Z + X1 + X2 LE 1 2Z –X1 – X2 LE 0 Z, X1, and X2 are binary variables Z = 1 if both X1 and X2 =1 Z = 0 if either X1 or X2 =0

  23. Approximation of Nonlinear Functions I will skip this section for now and come back to it when we cover nonlinear modeling.

  24. Integer Programming Formulations Chapter 16 McCarl and Spreen

  25. Knapsack – Capital Budgeting Model A hiker has limited carrying capacity in a knapsack and must select the most valuable items to carry. Partial items are not allowed. Other problems with the same formulation involve capital budgeting, where partial investments are not allowed and total capital is limited.

  26. General Formulation Max vjXj djXj LE W Xj are usual represented as binary variables If more than one of each item can be selected, the upper bound on the variables can be increased from 1 to whatever the limit is.

  27. Warehouse Location This model is an extension of the basic transportation model. The basic decision involves a trade-off between fixed warehouse construction costs and transportation costs. The choice to locate a warehouse in a particular place is represented by a binary variable.

  28. Example Warehouse Problem A firm can construct a warehouse at one of three sites: A, B, or C. The firm currently has two supply points and ships to two demand points.

  29. Supply and Demand

  30. Cost of Warehouses

  31. Costs of Shipping

  32. Tableau

  33. Solution

  34. Look At • Traveling Salesman problem on your own • Machinery Selection Problem on your own • We'll cover decreasing cost example when we look at approximating nonlinearities

More Related