Mixed Integer Linear Programming (MILP) Tutorial
Linear programming formulation examples OR-Notes OR-Notes are a series of introductory notes on topics that fall under the broad heading of the field of operations research OR.
They were originally used by me in an introductory OR course I give at Imperial College.
They are now available for use by any students and teachers interested in OR subject to the following.
A full list of the topics available in OR-Notes can be found.
Linear programming formulation examples Linear programming example 1996 MBA exam A cargo plane has three compartments for storing cargo: front, centre and rear.
These compartments have the following limits on both weight and space: Compartment Weight capacity tonnes Space capacity cubic metres Front 10 6800 Centre 16 8700 Rear 8 5300 Furthermore, the weight of the cargo in the respective compartments must be the same proportion of that compartment's weight capacity to maintain the balance of the plane.
The objective is to determine lingo linear programming example much if any of each cargo C1, C2, C3 and C4 should be accepted and how to distribute each among the compartments so that the total profit for the flight is maximised.
Solution Variables We need to decide how much of each of the four cargoes to put in lingo linear programming example of the three compartments.
A canning company operates two canning plants.
The company can sell at this price all they can produce.
The objective is to find the best mixture of the quantities supplied by the three growers to the two plants so that the company maximises its profits.
Often we have to ignore parts of the entire problem.
Each day of every working week is divided into three eight-hour shift periods 00:01-08:00, 08:01-16:00, 16:01-24:00 denoted by night, day and late respectively.
In total there are currently 60 workers.
Solution Variables The union agreement is such that any worker can only start their four consecutive work days on one of the seven days Mon to Sun and in one of the three eight-hour shifts night, day, late.
Let: Monday be day 1, Tuesday be day 2.
Objective It appears from the question read article the production manager's objective is simply to find a feasible schedule so any objective is possible.
This completes the formulation of the problem as a linear program.
Linear programming example 1991 UG exam A company manufactures four products 1,2,3,4 on two machines X and Lingo linear programming example />The time in minutes to process one unit of each product on each machine is shown below: Machine X Y Product 1 10 27 2 12 19 3 13 33 4 8 23 The profit per unit for each product 1,2,3,4 lingo linear programming example £10, £12, £17 handicap betting rules soccer £8 respectively.
Product 1 must be produced on both machines X and Y but products 2, 3 and 4 can be produced on either lingo linear programming example />The factory is very small and this means that floor space is very limited.
Only one week's production is stored in 50 square metres of floor space where the floor space taken up by each product is 0.
Customer requirements mean that the amount of product 3 produced should be related to the amount of product 2 produced.
Over a week approximately twice as many units of product 2 should be produced as product 3.
Assuming a working week 35 hours long formulate the problem of how to manufacture these products as a linear program.
Solution Variables Essentially we are interested in the amount produced on each http://the-best-slot.top/soccer/brazil-olympic-games-soccer.html />The demand in units for its product over that timescale is as shown below: Month 3 4 5 6 7 8 Demand 5000 6000 6500 7000 8000 9500 The company currently has in stock: 1000 units which were produced in month game championship world soccer cup online 2000 units which were produced in month 1; 500 units which were produced in month 0.
The company can only produce up to 6000 units per month and the managing director has stated that stocks must be built up to help meet demand in months 5, 6, 7 and 8.
Each unit produced costs £15 and the cost of holding stock is estimated to be £0.
The company has a major problem with deterioration of stock in that the stock inspection which takes place at the end of each month regularly identifies ruined stock costing the company £25 per unit.
It is estimated that, on average, the stock inspection at the end lingo linear programming example month t will show that 11% of the units in stock which were produced in month t are ruined; 47% of the units in stock which were produced in month t-1 are ruined; scandal italian soccer of the units in stock which were produced in month t-2 are ruined.
The stock inspection for month 2 is just about to take learn more here />The company wants a production plan for the next six months that avoids stockouts.
Formulate their problem as a linear program.
Because of the stock deterioration problem the managing director is thinking of directing that customers should always be supplied with the oldest stock available.
How would this affect your formulation of the problem?
If we want to ensure that demand is met from the oldest stock first then we can conclude that this is already assumed in the numerical solution to our formulation of the problem since plainly it worsens the objective to age stock unnecessarily and so in minimising costs we will automatically supply via the d it variables the oldest stock first to satisfy demand although the managing director needs to tell the employees to issue the oldest stock first.
Linear programming example 1986 UG exam A company assembles four products 1, 2, 3, 4 from delivered components.
The profit per unit for each product 1, 2, 3, 4 is £10, £15, £22 and £17 respectively.
The maximum demand in the next week for each product 1, 2, 3, 4 is 50, 60, 85 and 70 units respectively.
There are three stages A, B, C in the manual assembly of each product and the man-hours needed for each stage per unit of product are shown below: Product 1 2 3 4 Stage A 2 2 1 1 B 2 4 1 2 C 3 6 1 5 The nominal time available in the next week for assembly at each stage A, B, C is 160, 200 and 80 man-hours respectively.
It is possible to vary the lingo linear programming example spent on assembly at each stage such that workers previously employed on stage B assembly could spend up to 20% of their time on stage A assembly and workers previously employed on stage C assembly could spend up to 30% of their time on stage A assembly.
Formulate the problem of deciding how much to produce next week as a linear program.
Linear programming example A company makes three products and has available 4 workstations.
The production time in minutes per unit produced varies from workstation to workstation due to different manning levels as shown below: Workstation 1 2 3 4 Product 1 5 7 4 10 2 6 12 8 15 3 13 14 9 17 Similarly the profit £ contribution contribution to fixed costs per unit varies from workstation to workstation as below Workstation 1 2 3 4 Product 1 10 8 6 9 2 18 20 15 17 3 soccer online games 16 13 17 If, one week, there are 35 working hours available at each workstation how much of each product should be produced given that we need at least 100 units of product 1, 150 units of product 2 and 100 units of product 3.
Formulate this problem as an LP.
Solution Variables At first sight we are trying to decide how much of each product to make.
However on closer inspection it is clear that we click the following article to decide how much of each product to make at each workstation.
Although strictly all the x ij variables should be integer they are likely to be quite large and so we let them take fractional values and ignore any fractional parts in the numerical solution.
Note too that the question explicitly asks us to formulate the problem as an LP rather than as an IP.
Constraints We first formulate each constraint in words and then in a mathematical way.
A can consists of a main body and two ends.
We have 4 possible stamping patterns involving 2 different types sizes of metal sheet.
Often in formulating LP's it is easier to use a symbol for a number rather than write out the number in full every time it occurs in a constraint or in the objective function.
Let P be the profit obtained from selling one can, C be the cost per unit of scrap, T be the total number of hours available per week, L 1 be the number of metal sheets of type 1 which are available for stamping per week and L 2 be the number of metal sheets of type 2 which are available for stamping per week.
At the start of the week there is nothing in stock.
Each unused main body in stock at the end of the week incurs a stock-holding cost of c 1.
Similarly each unused end in stock at the end of the week incurs a stock-holding cost of c 2.
Assume that all cans produced one week are sold that week.
How many cans should be produced per week?
Objective Presumably to maximise profit - hence maximise revenue - cost of scrap - unused main bodies stock - holding cost - unused ends stock - holding cost i.
Hence case b cannot occur and so case a is valid - replacing constraint A by constraints B and C generates a valid LP formulation of the problem.
Note that this problem illustrates that even if our initial formulation of the problem is non-linear we may be able to transform it into an LP.
Production planning problem A company is producing a product which requires, at the final assembly stage, three parts.
These three parts can be produced by two different departments as detailed below.
If department 1 has 100 working hours available, but department 2 has 110 working hours available, formulate the problem of minimising the cost of producing the finished assembled products needed this week as an LP, subject to the constraint that limited storage space means that a total of only 200 unassembled parts of all types can be stored at the end of the week.
Note: because of the way production is organised in the two departments it is not possible to produce, for example, only one or two parts in each department, e.
Production planning solution Variables We need to decide the amount of time given over to the production of parts in each department since we, obviously, may not make use of all the available working time and also to decide the total number of finished assembled products made.
Now to ensure that the number of assembled products produced is exactly y we need at least y part 1 here, at least y part 2 units and at least y part 3 units.
Linear programming - Problem formulation - Example 5 - Diet mix
(see also Exercise 20) from Chapter 1 illustrates this transformation. The range of nonlinear-programming applications is practically unlimited. For example, it is usually simple to give a nonlinear extension to any linear program. Moreover, the constraint x = 0 or 1 can be modeled as x(1 − x) = 0 and the constraint x integer as.
There can be you and are right.
Also that we would do without your excellent phrase
You are not right. I am assured. Let's discuss.
I am ready to help you, set questions. Together we can find the decision.
It was specially registered at a forum to tell to you thanks for council. How I can thank you?
I apologise, I can help nothing. I think, you will find the correct decision. Do not despair.
The matchless message, is pleasant to me :)
At you incorrect data