Hands-on Tutorial on Optimization
- F. Eberle, R. Hoeksma, and N. Megow
September 24, 2018
Modeling What is a model? What is a model? In general A - - PowerPoint PPT Presentation
Hands-on Tutorial on Optimization F. Eberle, R. Hoeksma, and N. Megow September 24, 2018 Modeling What is a model? What is a model? In general A representation of a real thing. What is a model? In general A representation of a real thing.
September 24, 2018
In general
A representation of a real thing.
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original)
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (often larger than the original)
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (often larger than the original) ◮ Model of a human skeleton (same size as the original)
The real thing Models
The real thing Models
The real thing Models
The real thing Models
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (larger than the original) ◮ Model of a human skeleton (same size as the original)
◮ Abstract models
◮ Description of a real thing (situation)
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (larger than the original) ◮ Model of a human skeleton (same size as the original)
◮ Abstract models
◮ Description of a real thing (situation) ◮ All information necessary for some purpose
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (larger than the original) ◮ Model of a human skeleton (same size as the original)
◮ Abstract models
◮ Description of a real thing (situation) ◮ All information necessary for some purpose
Example: Small World factory produces globes and maps
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (larger than the original) ◮ Model of a human skeleton (same size as the original)
◮ Abstract models
◮ Description of a real thing (situation) ◮ All information necessary for some purpose
Example: Small World factory produces globes and maps
◮ List of materials: wood, metal, plastics, screws, paper, and glue
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (larger than the original) ◮ Model of a human skeleton (same size as the original)
◮ Abstract models
◮ Description of a real thing (situation) ◮ All information necessary for some purpose
Example: Small World factory produces globes and maps
◮ List of materials: wood, metal, plastics, screws, paper, and glue ◮ Prices, supply, demand
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (larger than the original) ◮ Model of a human skeleton (same size as the original)
◮ Abstract models
◮ Description of a real thing (situation) ◮ All information necessary for some purpose
Example: Small World factory produces globes and maps
◮ List of materials: wood, metal, plastics, screws, paper, and glue ◮ Prices, supply, demand ◮ Print patterns
In general
A representation of a real thing.
◮ Concrete models - models that you can touch
◮ Model car (smaller than the original) ◮ Model of an insect (larger than the original) ◮ Model of a human skeleton (same size as the original)
◮ Abstract models
◮ Description of a real thing (situation) ◮ All information necessary for some purpose
Example: Small World factory produces globes and maps
◮ List of materials: wood, metal, plastics, screws, paper, and glue ◮ Prices, supply, demand ◮ Print patterns ◮ Assembly procedures
Gain information by:
◮ examining concrete models
Gain information by:
◮ examining concrete models ◮ getting an overview of important properties
Gain information by:
◮ examining concrete models ◮ getting an overview of important properties ◮ constructing concrete/abstract models (think about them)
Gain information by:
◮ examining concrete models ◮ getting an overview of important properties ◮ constructing concrete/abstract models (think about them) ◮ analyzing abstract/mathematical models
Gain information by:
◮ examining concrete models ◮ getting an overview of important properties ◮ constructing concrete/abstract models (think about them) ◮ analyzing abstract/mathematical models
Use the gained information to:
Gain information by:
◮ examining concrete models ◮ getting an overview of important properties ◮ constructing concrete/abstract models (think about them) ◮ analyzing abstract/mathematical models
Use the gained information to:
◮ Cut costs
Gain information by:
◮ examining concrete models ◮ getting an overview of important properties ◮ constructing concrete/abstract models (think about them) ◮ analyzing abstract/mathematical models
Use the gained information to:
◮ Cut costs ◮ Increase productivity
Gain information by:
◮ examining concrete models ◮ getting an overview of important properties ◮ constructing concrete/abstract models (think about them) ◮ analyzing abstract/mathematical models
Use the gained information to:
◮ Cut costs ◮ Increase productivity ◮ Make predictions
Gain information by:
◮ examining concrete models ◮ getting an overview of important properties ◮ constructing concrete/abstract models (think about them) ◮ analyzing abstract/mathematical models
Use the gained information to:
◮ Cut costs ◮ Increase productivity ◮ Make predictions ◮ Automate decision processes
Real world situation
Real world situation Model Formulation
Real world situation Model Mathematical solution Formulation Analysis/solver
Real world situation Model Mathematical solution Real solution Formulation Analysis/solver Interpretation
Real world situation Model Mathematical solution Real solution Formulation Analysis/solver Interpretation Evalutation
Formulation
◮ Mathematical language ◮ Parameters: known data ◮ Variables: unknown (decisions) ◮ Operators:
◮ ×, +, − , =, =, <, ≥, and, or,
Formulation should fit the available solution methods
◮ Mathematical theory ◮ Algorithms
Many types of mathematical models, e.g.:
◮ linear vs. non-linear ◮ stochastic vs. deterministic ◮ continuous vs. discrete ◮ dynamic vs. static
Many types of mathematical models, e.g.:
◮ linear vs. non-linear ◮ stochastic vs. deterministic ◮ continuous vs. discrete ◮ dynamic vs. static
In this course:
◮ (integer) linear programming models (ILP/LP) ◮ mathematically assisted decision making ◮ optimization according to objectives
Question → (linear) objective function Data → parameters Possible decisions → variables Conditions that have to be met → (linear) constraints
Question → (linear) objective function Data → parameters Possible decisions → variables Conditions that have to be met → (linear) constraints Structure of an (I)LP min / max [linear objective function] s.t. [linear constraints]
Question → (linear) objective function Data → parameters Possible decisions → variables Conditions that have to be met → (linear) constraints Example min x + 2y s.t. x + 1 2y ≤ 7 x ≥ y x ≥ 0 y ≥ 0
◮ Variables: x, y ◮ Parameters: a, b, c
Linear:
◮ Variables: x, y ◮ Parameters: a, b, c
Linear: x + y = 9 ax − by ≤ c a b x = y (x − 1)b ≤ a(1 − y)
◮ Variables: x, y ◮ Parameters: a, b, c
Linear: x + y = 9 ax − by ≤ c a b x = y (x − 1)b ≤ a(1 − y) Non-linear: xa + y2 ≥ 9 xy − ay ≤ c ex ≥ y
Client owns a potato chips factory
Client owns a potato chips factory Two types of chips
◮ Plain chips ◮ Mexican ribble chips
Client owns a potato chips factory Two types of chips
◮ Plain chips ◮ Mexican ribble chips
Three processes:
◮ Slicing ◮ Frying ◮ Packaging
Client owns a potato chips factory Two types of chips
◮ Plain chips ◮ Mexican ribble chips
Three processes:
◮ Slicing ◮ Frying ◮ Packaging
Processes take different amount of time for each type of chips (min/kg)
Client owns a potato chips factory Two types of chips
◮ Plain chips ◮ Mexican ribble chips
Three processes:
◮ Slicing ◮ Frying ◮ Packaging
Processes take different amount of time for each type of chips (min/kg) Processes have a limited amount of time they can be used (min/day)
Client owns a potato chips factory Two types of chips
◮ Plain chips ◮ Mexican ribble chips
Three processes:
◮ Slicing ◮ Frying ◮ Packaging
Processes take different amount of time for each type of chips (min/kg) Processes have a limited amount of time they can be used (min/day) Types of chips have a different net profit (/kg)
Client owns a potato chips factory Two types of chips
◮ Plain chips ◮ Mexican ribble chips
Three processes:
◮ Slicing ◮ Frying ◮ Packaging
Processes take different amount of time for each type of chips (min/kg) Processes have a limited amount of time they can be used (min/day) Types of chips have a different net profit (/kg) Objective: Maximize the profit per day (/day)
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables:
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables: Xp, Xm (amount of each type made per day)
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables: Xp, Xm (amount of each type made per day) Constraints:
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables: Xp, Xm (amount of each type made per day) Constraints: 2Xp + 4Xm ≤ 345 (slicing constraint)
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables: Xp, Xm (amount of each type made per day) Constraints: 2Xp + 4Xm ≤ 345 (slicing constraint) 4Xp + 5Xm ≤ 480 (frying constraint)
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables: Xp, Xm (amount of each type made per day) Constraints: 2Xp + 4Xm ≤ 345 (slicing constraint) 4Xp + 5Xm ≤ 480 (frying constraint) 4Xp + 2Xm ≤ 330 (packaging constraint)
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables: Xp, Xm (amount of each type made per day) Constraints: 2Xp + 4Xm ≤ 345 (slicing constraint) 4Xp + 5Xm ≤ 480 (frying constraint) 4Xp + 2Xm ≤ 330 (packaging constraint) Xp, Xm ≥ 0 (non-negativity constraints)
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables: Xp, Xm (amount of each type made per day) Constraints: 2Xp + 4Xm ≤ 345 (slicing constraint) 4Xp + 5Xm ≤ 480 (frying constraint) 4Xp + 2Xm ≤ 330 (packaging constraint) Xp, Xm ≥ 0 (non-negativity constraints) Objective:
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 Variables: Xp, Xm (amount of each type made per day) Constraints: 2Xp + 4Xm ≤ 345 (slicing constraint) 4Xp + 5Xm ≤ 480 (frying constraint) 4Xp + 2Xm ≤ 330 (packaging constraint) Xp, Xm ≥ 0 (non-negativity constraints) Objective: max 2Xp + 1.5Xm (maximize total profit)
Data Time required for (min/kg): Plain Mexican Time available (min/day): Slicing 2 4 345 Frying 4 5 480 Packaging 4 2 330 Net profit (/kg): 2 1.5 max 2Xp + 3 2Xm s.t. 2Xp + 4Xm ≤ 345 4Xp + 5Xm ≤ 480 4Xp + 2Xm ≤ 330 Xp, Xm ≥ 0
Sets: Parameters: Variables: Objective: Constraints:
Sets: I chips types (i) J processes (j) Parameters: Variables: Objective: Constraints:
Sets: I chips types (i) J processes (j) Parameters: aj available time for process j ∈ J (min/day) pi net profit of type i ∈ I (/kg) rij time required for process j ∈ J and type i ∈ I (min/kg) Variables: Objective: Constraints:
Sets: I chips types (i) J processes (j) Parameters: aj available time for process j ∈ J (min/day) pi net profit of type i ∈ I (/kg) rij time required for process j ∈ J and type i ∈ I (min/kg) Variables: xi amount of type i ∈ I produced per day (kg/day) Objective: Constraints:
Sets: I chips types (i) J processes (j) Parameters: aj available time for process j ∈ J (min/day) pi net profit of type i ∈ I (/kg) rij time required for process j ∈ J and type i ∈ I (min/kg) Variables: xi amount of type i ∈ I produced per day (kg/day) Objective:
maximize total profit Constraints:
Sets: I chips types (i) J processes (j) Parameters: aj available time for process j ∈ J (min/day) pi net profit of type i ∈ I (/kg) rij time required for process j ∈ J and type i ∈ I (min/kg) Variables: xi amount of type i ∈ I produced per day (kg/day) Objective:
maximize total profit Constraints:
production process time constraints xi ≥ 0 non-negativity constraints
The Small World factory produces globes and world maps. They are developing a new kind of compound material for their world maps. For this compound they use four layers of base material. One paper layer,
layers in between. They want the material to have certain properties, but at the same time the material cannot be too expensive.
The desired properties of the material are as follows:
◮ The map has to be flexible, this means that the water proof
coating and the glue layers should not make up more than half of the material used.
◮ The map has to be strong, the strength of the map comes
primarily from the rubber material and secondarily from the glue
layers have a strength index of 2 per mm. The average strength index of the map should be at least 2 per mm.
◮ The printing process needs to be done on the paper layer, the
printer cannot handle paper that is thinner than 0.3 mm.
◮ The map has to stay together, therefore for each 1 mm of other
material there has to be at least 0.1 mm of glue
◮ The map cannot be too thin, not thinner than 1.2 mm in total. ◮ To be waterproof, the coating should be at least 0.4mm thick. ◮ The price of the layers is 4 per mm rubber, 2 per mm paper,
3 per mm coating, and 1 per mm glue.
x ≥ 0 is a positive continuous variable.
x ≥ 0 is a positive continuous variable. In reality many decisions concern discrete quantities or discrete choices:
◮ Which hotel/flight/train do I take?
x ≥ 0 is a positive continuous variable. In reality many decisions concern discrete quantities or discrete choices:
◮ Which hotel/flight/train do I take? ◮ How many bottles of champagne do I buy for the party?
x ≥ 0 is a positive continuous variable. In reality many decisions concern discrete quantities or discrete choices:
◮ Which hotel/flight/train do I take? ◮ How many bottles of champagne do I buy for the party? ◮ How many students can attend this course?
x ≥ 0 is a positive continuous variable. In reality many decisions concern discrete quantities or discrete choices:
◮ Which hotel/flight/train do I take? ◮ How many bottles of champagne do I buy for the party? ◮ How many students can attend this course? ◮ Where do we build a distribution center?
x ≥ 0 is a positive continuous variable. In reality many decisions concern discrete quantities or discrete choices:
◮ Which hotel/flight/train do I take? ◮ How many bottles of champagne do I buy for the party? ◮ How many students can attend this course? ◮ Where do we build a distribution center? ◮ How much extra personnel do we hire?
x ≥ 0 is a positive continuous variable. In reality many decisions concern discrete quantities or discrete choices:
◮ Which hotel/flight/train do I take? ◮ How many bottles of champagne do I buy for the party? ◮ How many students can attend this course? ◮ Where do we build a distribution center? ◮ How much extra personnel do we hire? ◮ How many bags of chips do we produce per day?
x ≥ 0 is a positive continuous variable. In reality many decisions concern discrete quantities or discrete choices:
◮ Which hotel/flight/train do I take? ◮ How many bottles of champagne do I buy for the party? ◮ How many students can attend this course? ◮ Where do we build a distribution center? ◮ How much extra personnel do we hire? ◮ How many bags of chips do we produce per day?
x ≥ 0 is a positive continuous variable. In reality many decisions concern discrete quantities or discrete choices:
◮ Which hotel/flight/train do I take? ◮ How many bottles of champagne do I buy for the party? ◮ How many students can attend this course? ◮ Where do we build a distribution center? ◮ How much extra personnel do we hire? ◮ How many bags of chips do we produce per day?
→ integer decision variables
◮ x ∈ N (integer) ◮ x ∈ {0, 1} (boolean)
We have a litter of 8 kittens, each of them a little different. There are 8 people that each want a kitten and have a preference list for them. They awarded each kitten with a distinct score from 8-1, highest being their favorite. We want to assign each kitten to a person, such that the total score of the assignment is maximized.
Training new flight attendants (FA).
◮ Training time (in months) is fixed, after that trainees start working
as FA
◮ Both trainees and FAs can work restricted number of hours per
month (trainees << FAs)
◮ Max training spots for trainees is fixed ◮ For the next half year we know the number of resignations and
total workload (in required hours)
◮ We know the number of flight attendants that we currently have ◮ We cannot fire people ◮ FA has a fixed salary cost > than the fixed salary cost of a trainee ◮ We want to hire trainees to satisfy the total workload for the next
half year, minimizing the total personnel cost.
◮ Training time = 2 months ◮ Working hours = 25 (trainee), 150 (FA) ◮ Training spots = 5 ◮ Current FAs = 60 ◮ Salary cost = 3600 (trainee), 5100 (FA)
months required hours resignations January 8,000 2 February 9,000 March 9,800 2 April 9,900 May 10,050 1 June 10,500