• Ingen resultater fundet

Modelling: How ?

N/A
N/A
Info
Hent
Protected

Academic year: 2022

Del "Modelling: How ?"

Copied!
32
0
0

Indlæser.... (se fuldtekst nu)

Hele teksten

(1)

Linear Programming

– the simple Wyndor Glass example

Thomas Stidsen

tks@imm.dtu.dk

Informatics and Mathematical Modeling Technical University of Denmark

(2)

LP parts:

Decision variables Objective function Constraints

Wyndor glass

Wyndor model in Excel

(3)

LP: Linear Programming

ILP: Integer Linear Programming

Solver: An algorithm/a program which finds the optimal solution to LP/ILP problems

Decision variables: An un-decided decision which is left to the solver

Objective function: A function specifying the

cost of a certain setting of the decision variables Constraint set: A set of equations limiting the

possible values of the decision variables

(4)

elements:

(Decision) Variables

(Linear) Objective function A set of (linear) constraints

(5)

M AX 300x + 500y

(6)

M AX 300x + 500y ST :

x ≤ 4 2y ≤ 12 3x + 2y ≤ 18

(7)

M AX 300x + 500y ST :

x ≤ 4 2y ≤ 12 3x + 2y ≤ 18

x ≥ 0 y ≥ 0

(8)

x 8

6

4

2

2 4 6 8

Only positive

(9)

y

x 8

6

4

2

2 6 8

y <= 6

4

2y ≤ 12

(10)

y <= 6

x 8

6

4

2

2 8

x <= 4

6 4

x ≤ 4

(11)

4 6 8 2

2 4 6 8

x y

y <= 6 x <= 4

3x + 2y <= 18

3x + 2y ≤ 18

(12)

4 6 8 2

2 4 6 8

x y <= 6 x <= 4

3x + 2y <= 18

f(x)=300x+500y

f(x) = 300x + 500y

(13)

4 6 8 2

2 4 6 8

x y

y <= 6 x <= 4

3x + 2y <= 18

Maximisation

f(x)=300x+500y

Maximal point: x = 2 and y = 6

(14)

LP models are extremely usefull

Modelling is the proces of formulating a mahtematical model for the problem.

Lets look at a simple problem, the Wyndor glass problem, from the book “Introduction to Operations Research”, by Hillier & Liberman.

(15)

Wyndor glass is a compagny producing different kinds of windows and (window) doors. They are considering two new types of products, a new alu- minium door and wooden window. The question is now: Which mix of products should be produced, limited by the capacity of the production lines such that the profit is maximized ?

(16)

A production line for aluminium frames, (4 production hours available)

A production line for wood frames, (12 production hours available)

An assembly line, (18 production hours available)

(17)

Each batch of doors requires:

1 hour of work on the aluminium framing line 3 hours of work on the assembling line

Each batch of doors can be sold for 300 $’s.

(18)

2 hours of work on the wood framing line 2 hours of work on the assembling line

Each batch of windows can be sold for 500 $’s.

(19)

Informatics and Mathematical Modelling / Operations Research

Modelling: How ?

Given a problem we should ask the following questions:

What should we decide ? What are the limits on the produktion plans ?

Do not overuse the production capacity and only allow positive production.

What is the goal ?

Maximize the profit: 300D + 500W

(20)

Informatics and Mathematical Modelling / Operations Research

Modelling: How ?

Given a problem we should ask the following questions:

What should we decide ?

The ammount of production of Doors and Windows

What is the goal ?

Maximize the profit: 300D + 500W

(21)

Informatics and Mathematical Modelling / Operations Research

Modelling: How ?

Given a problem we should ask the following questions:

What should we decide ?

The ammount of production of Doors and Windows

What are the limits on the produktion plans ? What is the goal ?

Maximize the profit: 300D + 500W

(22)

Informatics and Mathematical Modelling / Operations Research

Modelling: How ?

Given a problem we should ask the following questions:

What should we decide ?

The ammount of production of Doors and Windows

What are the limits on the produktion plans ? Do not overuse the production capacity and only allow positive production.

(23)

Informatics and Mathematical Modelling / Operations Research

Modelling: How ?

Given a problem we should ask the following questions:

What should we decide ?

The ammount of production of Doors and Windows

What are the limits on the produktion plans ? Do not overuse the production capacity and only allow positive production.

What is the goal ?

(24)

questions:

What should we decide ?

The ammount of production of Doors and Windows

What are the limits on the produktion plans ? Do not overuse the production capacity and only allow positive production.

What is the goal ?

Maximize the profit: 300D + 500W

(25)

We decide:

The production (in batches) is defined by two decision variables: D (Doors) and W

(Windows)

The profit is calculated as a linear function:

prof it = 300 · D + 500 · W

The limited capacity of each line is modelled as a constraint.

(26)

M AX 300D + 500W ST :

D ≤ 4 2W ≤ 12 3D + 2W ≤ 18

D ≥ 0 W ≥ 0 Hmmm, this looks familiar ....

(27)

4 6 8 2

2 4 6 8

x y

y <= 6 x <= 4

3x + 2y <= 18

Maximisation

f(x)=300x+500y

(28)

earn us any money !

Finding optimal solutions is not trivial in more than 2 dimensions ...

... and we would like the computer do do the work for us ...

This is where Excel comes in: We can translate our above model into a linear model in Excel and the built in solver will find the optimal solution (but of course we already know it: D = 2 and W = 6).

(29)

Hence: Switch to Excel

(30)

following way:

Login to the databar

Start windows: win desk

Log into Excel again (same login name and password)

Choose Excel from the start button

(31)

Add solver login (unfortunately this is necessary after every Excel start up ...)

Tools drop down menu Choose add in’s

Choose solver add in Select ok

Load your favorite Excel model ....

(32)

Establish the “constraint result cells”, using sumproduct for each constraint

Establish the result cell (again sumproduct) Enter the solver

Select the cell

Add the constraints

Set options (assume linear annd non-negative)

Say ok

Referencer

RELATEREDE DOKUMENTER

It was then that Henry Ford entered onto a path towards a novel form of industrial mass production, based on the assembly line, taking place in a fac tory regime where

Live weight CO 2 production CH 4 production Retained carbon Digested nitrogen Urine nitrogen Retained nitrogen Intake of gross energy Metabolizable energy Total heat energy

in 2005 to around 10% in 2009, after which it fell to just under 9% in 2010. Looking at added value relative to the number of full-time employees, reveals a measurement of

Also reporting the capital and operating costs on the basis of just the diesel production and not on the diesel plus gasoline production makes a comparison to

Curitiba, Brazil –BioAg production –Enzyme production –R&amp;D office Pilar, Argentina. –BioAG production

Whether the dependence is explicated formally (in the contract) or informally in the process is indicated in the left column. The two analysis presented in table 2 and 3 show that

The dispositive: architecture as a social technique or apparatus (the media and the production of the architect, the organisation of architectural space and the production of

For all concentrations o f isoproturon both in plough layer and subsoil except 5000 mg kg“ * in subsoil, where the degradation was too slow to give usable fits the