Optimization Problems

Slides:



Advertisements
Similar presentations
February 14, 2002 Putting Linear Programs into standard form
Advertisements

The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
1 Constraint operations: Simplification, Optimization and Implication.
1 Chapter 2: Simplification, Optimization and Implication Where we learn more fun things we can do with constraints.
CS 312 – Linear Programming
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Linear Inequalities and Linear Programming Chapter 5
The Simplex Method: Standard Maximization Problems
Operation Research Chapter 3 Simplex Method.
5.6 Maximization and Minimization with Mixed Problem Constraints
Sebastian Bitzer Seminar Constraint Logic Programming University of Osnabrueck November 11 th 2002 The Simplex Algorithm.
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
3-6 Solving Systems of Linear Equations in Three Variables Objective: CA 2.0: Students solve systems of linear equations and inequalities in three variables.
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
Algebra 2 Chapter 3 Notes Systems of Linear Equalities and Inequalities Algebra 2 Chapter 3 Notes Systems of Linear Equalities and Inequalities.
1. The Simplex Method.
Chapter 6 Linear Programming: The Simplex Method
Simplex method (algebraic interpretation)
Simplex Algorithm.Big M Method
This presentation shows how the tableau method is used to solve a simple linear programming problem in two variables: Maximising subject to two  constraints.
ECE 556 Linear Programming Ting-Yuan Wang Electrical and Computer Engineering University of Wisconsin-Madison March
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.4 The student will be able to set up and solve linear programming problems.
Chapter 6 Linear Programming: The Simplex Method Section 4 Maximization and Minimization with Problem Constraints.
1 Chapter 3: Finite Constraint Domains Where we meet the simplest and yet most difficult constraints, and some clever and not so clever ways to solve them.
Simplex Method Simplex: a linear-programming algorithm that can solve problems having more than two decision variables. The simplex technique involves.
Part 3. Linear Programming 3.2 Algorithm. General Formulation Convex function Convex region.
Decision Support Systems INF421 & IS Simplex: a linear-programming algorithm that can solve problems having more than two decision variables.
1 Two-Phase Simplex Method file Simplex3_AMII_05b_gr Rev. 1.4 by M. Miccio on December 17, 2014 from a presentation at the Fuqua School of Business MIT.
Chapter 2: Simplification, Optimization and Implication
Discrete Optimization
What are they, what do they do and what can I use them for.
Linear Programming for Solving the DSS Problems
Linear Programming Many problems take the form of maximizing or minimizing an objective, given limited resources and competing constraints. specify the.
Solving Linear Program by Simplex Method The Concept
Simplex Algorithm.Big M Method
Lap Chi Lau we will only use slides 4 to 19
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Chap 10. Sensitivity Analysis
Chapter 2: Simplification, Optimization and Implication
Topics in Algorithms Lap Chi Lau.
Perturbation method, lexicographic method
10CS661 OPERATION RESEARCH Engineered for Tomorrow.
10CS661 OPERATION RESEARCH Engineered for Tomorrow.
The Two-Phase Simplex Method
Linear Inequalities and Absolute Value
THE SUBSTITUTION METHOD
Linear Programming.
Chapter 4 Linear Programming: The Simplex Method
Chap 9. General LP problems: Duality and Infeasibility
The Simplex Method.
Chapter 6. Large Scale Optimization
Chapter 3 The Simplex Method and Sensitivity Analysis
Part 3. Linear Programming
Solving Linear Programming Problems: Asst. Prof. Dr. Nergiz Kasımbeyli
Well, just how many basic
Chapter 8. General LP Problems
Chapter 3: Finite Constraint Domains
Solving Systems of Equations by the Substitution and Addition Methods
Chapter 8. General LP Problems
Part 3. Linear Programming
Chapter 2. Simplex method
Simplex method (algebraic interpretation)
Chapter 10: Iterative Improvement
Chapter 8. General LP Problems
Prepared by Po-Chuan on 2016/05/24
Integer LP: Algorithms
Chapter 6. Large Scale Optimization
Presentation transcript:

Optimization Problems Where we learn more fun things we can do with constraints. CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication Often given some problem which is modelled by constraints we don’t want just any solution, but a “best” solution This is an optimization problem We need an objective function, a mapping from solutions to reals, so that we can rank solutions By convention, we always try to minimize CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication An optimization problem (C,f) consists of a constraint C and objective function f A valuation v1 is preferred to valuation v2 if f(v1) < f(v2) An optimal solution is a solution of C such that no other solution of C is preferred to it Optimization problems may have more than one optimal solution CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication Optimization Example An optimization problem Find the closest point to the origin satisfying C. Some solutions and f values Optimal solution CSC5240 - Simplification, Optimization and Implication

Optimization Peculiarities Some optimization problems have no solution. Constraint has no solution For any solution, there is a more preferable one. In other words, problem has no optimum. Can you give an example? CSC5240 - Simplification, Optimization and Implication

Optimization for FD CSPs Domains are finite We can use a solver to build a straightforward optimizer retry_int_opt(C, D, f, best) D2 := int_solv(C,D) if D2 is a false domain then return best let sol be the solution corresponding to D2 return retry_int_opt(C /\ f < sol(f), D, f, sol) CSC5240 - Finite Constraint Domains

Retry Optimization Example Smugglers knapsack problem (optimize profit) First solution found: Corresponding solution CSC5240 - Finite Constraint Domains

Retry Optimization Example Smugglers knapsack problem (optimize profit) First solution found: Corresponding solution CSC5240 - Finite Constraint Domains

Retry Optimization Example Smugglers knapsack problem (optimize profit) Next solution found: Corresponding solution CSC5240 - Finite Constraint Domains

Retry Optimization Example Smugglers knapsack problem (optimize profit) Next solution found: Corresponding solution CSC5240 - Finite Constraint Domains

Retry Optimization Example Smugglers knapsack problem (optimize profit) Next solution found: Corresponding solution CSC5240 - Finite Constraint Domains

Retry Optimization Example Smugglers knapsack problem (optimize profit) No next solution! Corresponding solution CSC5240 - Finite Constraint Domains

Retry Optimization Example Smugglers knapsack problem (optimize profit) No next solution! Return best solution CSC5240 - Finite Constraint Domains

CSC5240 - Finite Constraint Domains Branch and Bound (BAB) Since the solver may use backtrack search anyway combine it with the optimization At each step in backtracking search, if best is the best solution so far add the constraint f < best(f) CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: Initial bounds consistency CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: Initial bounds consistency CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: Initial bounds consistency W = 0 CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: Initial bounds consistency W = 0 CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: Initial bounds consistency W = 0 P = 1 CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: Initial bounds consistency W = 0 P = 1 CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: Initial bounds consistency W = 0 Solution Found: add constraint P = 1 (0,1,3) CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Current domain: Initial bounds consistency W = 0 Solution Found: add constraint P = 1 (0,1,3) CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Initial bounds consistency W = 0 P = 1 (0,1,3) CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Initial bounds consistency W = 0 P = 1 P = 2 (0,1,3) false CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Initial bounds consistency W = 0 P = 1 P = 2 P = 3 (0,1,3) false false CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Initial bounds consistency W = 0 W = 1 P = 1 P = 2 P = 3 (1,1,1) (0,1,3) false false CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Initial bounds consistency W = 0 W = 1 P = 1 P = 2 P = 3 (1,1,1) (0,1,3) false false Modify constraint CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Initial bounds consistency W = 0 W = 1 P = 1 P = 2 P = 3 (1,1,1) (0,1,3) false false Modify constraint CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Initial bounds consistency W = 0 W = 1 W = 2 P = 1 P = 2 P = 3 (1,1,1) false (0,1,3) false false Modify constraint CSC5240 - Finite Constraint Domains

Branch and Bound (BAB) Eg Smugglers knapsack problem (whiskey available) Initial bounds consistency W = 0 W = 1 W = 2 P = 1 P = 2 P = 3 (1,1,1) false (0,1,3) false false Return last sol (1,1,1) CSC5240 - Finite Constraint Domains

The Simplex Algorithm - 1 The most widely used optimization algorithm Optimizes a linear function wrt to linear constraints Related to Gauss-Jordan elimination Based on the following observations Linear constraints form convex polygons Optimal solution always occur at a vertex CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication The Simplex Form An optimization problem (C, f) is in simplex form: C is the conjunction of CE and CI CE is a conjunction of linear equations CI constrains all variables in C to be non-negative f is a linear expression over variables in C CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication Simplex Form Example An optimization problem in simplex form An arbitrary problem can be put in simplex form by replacing unconstrained var X by new vars and inequality by new vars and CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication Simplex Solved Form - 1 The simplex method works by repeatedly transforming an optimization problem in “basic feasible solved form” and to another A simplex optimization problem is in basic feasible solved (bfs) form if: The equations are in solved form Each constant on the right hand side is non-negative Only parameters occur in the objective CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication Simplex Solved Form - 2 Every problem in bfs form has a corresponding “basic feasible solution” which corresponds to a vertex of the polygon defined by the constraint A basic feasible solution is obtained by setting each parameter to 0 and each non-parameter to the constant in its equation CSC5240 - Simplification, Optimization and Implication

Simplex Solved Form Example An equivalent problem to the previous example in the bfs form We can read off a solution and its objective value CSC5240 - Simplification, Optimization and Implication

The Simplex Algorithm - 2 The simplex algorithm finds the optimum by repeatedly looking for an “adjacent” basic feasible solved form whose basic feasible solution decreases the value of the objective function until no such neighbour can be found By adjacent, we mean that the new bfs form can be reached by a single “pivoting” operation CSC5240 - Simplification, Optimization and Implication

The Simplex Algorithm - 3 starting from a problem in bfs form repeat Choose a variable y with negative coefficient in the obj. func. Find the equation x = b + cy + ... where c<0 and -b/c is minimal Rewrite this equation with y being the subject y = -b/c + 1/c x + ... Substitute -b/c + 1/c x + ... for y in all other eqns and obj. func. until no such variable y exists or no such equation exists if no such y exists then optimum is found else there is no optimum solution CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication Simplex Example Choose variable Z, the 2nd eqn is only one with neg. coeff Choose variable Y, the first eqn is only one with neg. coeff No variable can be chosen, optimal value 2 is found CSC5240 - Simplification, Optimization and Implication

Another Simplex Example - 1 An equivalent simplex form is: An optimization problem showing contours of the objective function CSC5240 - Simplification, Optimization and Implication

Another Simplex Example - 2 Basic feasible solved form: circle Choose S3, replace using 2nd eq Optimal solution: box CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication The Missing Part - 1 How do we get the initial bfs form and its basic feasible solution? Solve a different simplex problem Add artificial variables to make equations in basic feasible solved form Minimize the sum of the artificial variables If the sum is zero, we can construct a bfs form for the original problem CSC5240 - Simplification, Optimization and Implication

The Missing Part Example - 1 Original simplex form equations With artificial vars in bfs form: Objective function rewritten: minimize CSC5240 - Simplification, Optimization and Implication

The Missing Part Example - 2 Problem after minimization of objective function Removing the artificial variables, the original problem is equivalent to CSC5240 - Simplification, Optimization and Implication

CSC5240 - Simplification, Optimization and Implication The Missing Part - 2 Must remember to eliminate the basic variables of the resultant bfs form from the original objective function Finding a bfs form of the original constraint is exactly a constraint satisfaction problem, and thus the first phase of the simplex method is an efficient constraint solver for linear inequalities CSC5240 - Simplification, Optimization and Implication

Integer Linear Programming Unlike Simplex, the previous methods don’t use the objective function to direct search Integer Linear Programming for (C,f) use simplex to find a real optimal, if solution is integer stop otherwise choose a var x with non-integer opt value d and examine the problems use the current best solution to constrain prob CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 false false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 Solution (1,1,1) = 32 false false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 Solution (1,1,1) = 32 false Worse than best sol false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem Solution (2,0,0) = 30 Solution (1,1,1) = 32 false Worse than best sol false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem false Solution (2,0,0) = 30 Solution (1,1,1) = 32 false Worse than best sol false false false CSC5240 - Finite Constraint Domains

Integer Linear Programming Eg Smugglers knapsack problem false false Solution (2,0,0) = 30 Solution (1,1,1) = 32 false Worse than best sol false false false CSC5240 - Finite Constraint Domains