1 / 12

Modeling problems with Integer Linear Programming (ILP)

Modeling problems with Integer Linear Programming (ILP) . Name: Chuan Huang. Use of ILP. Solution to network or graph problems. Traveling salesman problem Shortest path Minimum spanning tree Knapsack. Definition of ILP. minimize c T x subject to Ax b .

lowri
Download Presentation

Modeling problems with Integer Linear Programming (ILP)

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. Modeling problems with Integer Linear Programming (ILP) Name: Chuan Huang

  2. Use of ILP • Solution to network or graph problems. • Traveling salesman problem • Shortest path • Minimum spanning tree • Knapsack

  3. Definition of ILP minimize cTx subject to Ax b • Linear programming (LP) : mathematical method for determining a way to achieve the best outcome in a given mathematical model for some list of requirements represented as linear equations. • Integer linear programming(ILP): LP with some or all of the variables are restricted to be integers. • Canonical form:

  4. Modeling with ILP • Problem description • Formulation • Input • Output: Identify the decision variable which is binary; • Objective function: Minimize/Maximize a function under the constraints. • Constraints: Rules that the feasible solutions will satisfy. • Solution

  5. Solution to ILP • Package • GNU Linear Programming Kit (GLPK) • Cplex: mathematical optimizer • AMPL:A modeling language for Mathematical programmingdeveloped by BELL Laboratories. • Gusek - LP IDE in Windows • http://gusek.sourceforge.net/gusek.html

  6. Example 1 - Vertex Cover • Vertex cover: Is there a vertex cover of size K or less for G(V, E) such that for each edge {u, v} E at least one of u and v belongs to V. B C D A E F • Minimum vertex cover: Find a smallest vertex cover in a given graph. B C D A E F

  7. Example 1 - Input and Output Minimum vertex cover B C D A E F • Input: Set of vertexes V; Set of edges E; Costs of each vertex, c(i) = 1, where i V; • Output: The set of the vertexes; x(i) = 1 if ith vertex belongs to the set; otherwise x(i) = 0; • Objective: Minimum costs, .

  8. Example 1 – Input and Output(Cont) param m:=6; param : V : c := 1 1, 2 1, 3 1, 4 1, 5 1, 6 1; param : E : a := 1 2 1, 1 5 1 , 2 3 1, 2 5 1, 3 4 1 , 6 3 1, 6 5 1; Input /* Number of blocks */ param m, integer, > 0; /* Set of basic blocks */ set V, default {1..m}; /* Set of edges */ set E, within V cross V; /*Cost of vertex*/ param c{i in V}, default 0; Output var x{i in V}, binary, >=0; /*Decision*/ Vertex_cover.mod Vertex_cover.dat

  9. Example 1 – Objective and Constraints Mathematic description: AMPL: Objective: minimize obj: sum{i in V} x[i]*c[i]; s.t. phi{(i,j) in E}: x[i]+x[j] >= 1; Solve; Minimize c(v)xv (Minimize the total cost) Constraint: xv {0, 1} for all v E (Vertex is either in the vertex cover or not) xu+xv ≥ 1 for all {u, v} E (Cover every edge of the graph) Vertex_cover.mod

  10. Example 2- Vertex Cover with non-linear Costs B C D A E F Assume input, output and objective are same except Cost of each vertex: Decided by output x(i) Objective : Minimize X2! Not Linear!

  11. Example 2- Vertex Cover with non-linear Costs • Linearise the equations by using new variable Define variable cost(i), i B which represents the final cost of ith node. • Cost of each vertex: • Cost of each vertex • when x(i) is decided: • Equivalent objective : Minimize Linear!

  12. Example 2- Vertex Cover with non-linear Costs B C D A E F • Output: x = [1, 1, 0, 1, 0, 1]; cost = [1, 1, 0, 0, 0, 0]; Total cost = 2

More Related