Modelling simulation and optimization
Use Matlab to solve the problems.
All students have individual assignments
This assignment has two components. The first is a straightforward linear programming problem of supplying paint from various paint factories to 3 car plants. For the second the paint manufacturer then wants to allocate representatives to these factories to oversee the application of the paint to the cars and to deal with line problems as they occur.
It will be easier for you to do these as separate assignments, yet they must be submitted as a single assignment. Get started on this part first then tackle the second afterwards when you have watched the video on binary integer programming. Each part is 50% of the marks
Part 1
A global manufacturer of motor cars (Elgy Autos) has 3 manufacturing plants in Europe. It buys the paint needed to paint its cars from 4 factories (A,B,C,D) also spread over Europe. The suppliers supply paint at the following prices and limited amounts
Supplier | Cost € per m3 | Maximum capacity (m3) |
A | 706 | 1069 |
B | 757 | 1120 |
C | 758 | 1269 |
D | 1093 | 1162 |
It has been estimated that it cost €1.3 per km to ship 1m3 of paint and the distances in km between factories and car manufacturing plants is given below
From factory A | From factory B | From factory C | From factory D | |
To plant 1 | 1550 | 1666 | 1732 | 1336 |
To plant 2 | 1384 | 1249 | 1400 | 1262 |
To plant 3 | 1975 | 1249 | 838 | 1425 |
It takes 10 litres to paint each car. Elgy Autos plan to manufacture the following amounts of cars next year.
Plant | Number of cars |
1 | 95800 |
2 | 140000 |
3 | 146800 |
For political reason outside the control of the company paint factory C must supply a minimum of 350m3 to Elgy Autos.
What is the optimum amount of paint each factory should supply to each car manufacturing plant and what is the minimum cost of paint to the car manufacturer? As a note in the real world such an analysis is only the starting point. Sensitivity analysis would follow as well as some scenario planning such how much extra does the political constraint cost
What should be submitted.
Each student should submit .m files showing the file array structures for all matrices being passed to the matlab linear programming function
The calling functions themselves should be submitted. This should also be in the matlab script ( .m file)
The results should be submitted stating exactly how much paint goes from each factory to each plant.
No descriptive text is required for this part of the assignment.
Marking Schedule
Correct .m files (40%)
Correct use of optimisation function and reporting the results (10%)
I am expecting most students to get over 45% for this assignment and many to get full marks. There is no excuse for the matlab script to be wrong. Test it and make sure it gives the correct results before you submit. One simple test is to see if the solution is feasible.
Part 2
Once again involves the paint supply company and Elgy Autos.
The Problem
Elgy Autos has told the paint company that it needs to have representatives from the paint company on each of its sites: in the UK (plant 2), France (plant 1) and the Czech Republic (plant 3) to supervise the application of its paint to Elgy Autos motor cars. Elgy Autos have instructed the paint company that it does not care how many representatives are on site but they must cover the following skills
- At least one of its representatives must speak the local language
- At least one of the representatives must be able to do colour matching. That is making sure that each car and part of a car meets the colour specifications. This is actually a highly skilled job that needs lots of experience to do.
- At least one of the representatives must be able to do quality control, ie the paint viscosity must be correct, the adhesion must be correct, others factors such as orange pealing must not exist on the paint. Once again this is a highly skilled job.
The paint company has also decided that one of the representatives must
- Be able to deal with the logistics of supplying paint: it wants to maintain minimum stock levels on site yet if they run out of paint the production line must stop and would result in a fine of a million euros a day, which naturally it wants to avoid by having an experienced logistics manager on site. All we are interested in here is to have a logistics expert on site
The company has 8 candidates with various skills and associated costs of employing them in different locations. The task the paint company faces is which employees to place in each paint plant to meet the constraints and minimise the costs. Most potential representatives have more than one skill and more than one language so it may be possible to have only two representative at one plant, which will result in considerable savings for the company. No employee can work in more than one country.
The cost of employing each candidate representative in each country is given below in euros per annum.
France | UK | Czech Republic | |
Tinker | 89100 | 99000 | 72000 |
Tailor | 82800 | 118700 | 64700 |
Soldier | 109300 | 107000 | 63100 |
Sailor | 110100 | 73800 | 65200 |
Richman | 72200 | 98900 | 54300 |
Poorman | 71800 | 785000 | 63700 |
Beggarman | 106100 | 116300 | 66700 |
Thief | 90000 | 93700 | 64700 |
The language spoken by each representative are:
Tinker | English | Czech |
Tailor | English | French |
Soldier | Czech | English |
Sailor | English | |
Richman | English | |
Poorman | English | |
Beggarman | English | French |
Thief | Czech | English |
The skills each representative have are:
Tinker | Quality Control | Logistics |
Tailor | Logistics | Quality Control |
Soldier | Quality Control | |
Sailor | Colour Matching | Quality Control |
Richman | Logistics | Colour Matching |
Poorman | Quality Control | Colour Matching |
Beggarman | Quality Control | Colour Matching |
Thief | Colour Matching | Quality Control |
What you are required to do
You are to write a script in Matlab (a .m file) to solve the problem and submit the script to me along with any other tools you have used such as excel spreadsheets to solve this problem. You must also state clearly who is to work where and what it will cost.
It is possible that there is no combination of people that meet all the requirements. This happens in real life as well. If this happens for your set of employees sent me all your scripts and matrices and I will modify the skill sets/ languages of your candidates to get a feasible solution.
Marking Schedule
Supplying a Matlab script that gives the correct results for your problem will result in a mark of 50%. 10% will be taken off if the objective function is wrong and 5% for each wrong or missing constraint. Failure to actually state the results will result in a further 10% off. If the result is plainly stupid (ie a non-feasible solution) then a mark of zero will be awarded.
Hints
This may look a daunting task but it actually a straightforward task using intlinprog as I have shown in the video. Here are few hints for you to get started.
- Determine what your decision variables are – Since each of 8 people can work in each of 3 countries then there are 24 decision variables. The first of which is Tinker working in France.
- The coefficients of the objective function is the cost of employing each person in each country. The objective is to minimise the objective function and hence cost.
- The sum of countries at which a single employee can work is always less than or equal to one. I found writing the constraints matrix Atedious – there are 24 columns and lots of constraints so I filled this matrix in using excel and used xlsread in Matlab to import the values. Use help xlsread in Matlab or basically if there are 12 constraints it is
A=xlsread(“C:\temp\workfile”,”sheet 1”,”A1:X12”)
Filling the matrix with zeros and ones in Excel was much easier than in Matlab
- Check the script as you go along ant look carefully at the results