Datorövningar & inlämningsuppgifter

MIO310 Optimering och simulering
Datorövningar
&
inlämningsuppgifter
2015
Fredrik Olsson ([email protected]) &
Lina Johansson ([email protected])
Avdelningen för Produktionsekonomi
Datorövning 1 - The Grocery Store I
De två inledande datorövningarna i denna kurs syftar till att ni ska lära er grunderna för att
konstruera simuleringsmodeller i mjukvaran ExtendSim. Närvaro är obligatorisk på dessa
två inledande övningar. Därefter följer Inlämningsuppgift 1 i simulering där ni använder
ExtendSim, Inlämningsuppgift 2 i optimering, samt Inlämningsuppgift 3 som är en integrationsuppgift där ni använder både ExtendSim och MS Excel. Se kursprogrammet för detaljer
kring detta.
Innan tillfället för Datorövning 1 ska två förberedelseuppgifter utföras:
1. Läs kapitel 8.1-8.6 (s. 283-307) och kapitel 8.10 (s. 316-318) i Laguna&Marklundkursboken (andra upplagan). Notera att man inte kan använda första upplagan eller
tidigare års kurskompendier.
2. I kapitel 8.3 i kursboken finns det ett exempel på en simpel kömodell (Exempel 8.1, s.
290-294). Konstruera denna modell i ExtendSim. ExtendSim finns installerat på alla
datorer i datorsalarna Ina, Ida och Emma i M-huset. Verifiera att modellen ser ut som
i Figur 8.6 och kör en simulering på 40 timmar. Denna modell ska redovisas för övningsledaren vid datorövningens start. Se därför till att ni har modellfilen sparad och
tillgänglig, antingen i er personliga mapp på nätverket eller på ett usb-minne (spara
den inte lokalt på datorn).
Följande regler gäller för Datorövning 1:
 Endast studenter som är anmälda till aktuellt pass får deltaga vid övningen.
 Endast studenter som utfört förberedelseuppgifterna (och kan redovisa modellen i
förberedelseuppgift 2 vid övningens start) får deltaga vid övningen.
 Uppgifterna ska utföras i grupper om 2-3 studenter. Även förberedelseuppgift 2 får
utföras i grupp även om det är rekommenderat att den utförs individuellt.
 Varje uppgift (a-f) ska sparas i en separat fil (använd ett separat ”model worksheet”
för varje uppgift). Se till att ni sparar dessa filer så att ni kan komma åt dem vid Datorövning 2.
 Gruppen ska redovisa sina lösningar och godkännas av övningsledare innan ni lämnar salen.
 Om man inte hinner färdigt på utsatt tid eller inte kan närvara vid övningen (eller om
man inte uppfyller kriterierna ovan) så ska man individuellt, senast en vecka efter
övningstillfället, lämna in lösningar till samtliga uppgifter tillsammans med en skriftlig rapport i pdf-format innehållande svar på samtliga frågor. ExtendSim-filer och
rapporten skickas till [email protected].
Checklista för att närvara vid Datorövning 1:
□
□
Samtliga gruppdeltagare har bekräftats vara anmälda till aktuellt pass
Förberedelseuppgifterna är godkända
1
The Grocery Store I
This exercise deals with the problem of modeling the customer flow in a grocery store. The
pedagogical idea behind this exercise is to gradually increase the complexity of the model,
and hence let the student get a feel for how to structure and model a complex reality based
problem. The essence of model building is to take small steps and gradually introduce more
realistic assumptions about the problem considered.
You are hired by Safeway to help them build a number of simulation models to better understand the customer flows and queuing processes in a grocery store setting. The pilot project
at hand focuses on an off peak setting where at most two checkouts are open. To better understand the necessary level of detail and the complexities involved, Safeway wants a whole
battery of increasingly more realistic and complex models.
a)
In the first model your only interest is the queues building up at the checkout counters.
Empirical investigation has indicated that it is reasonable to model the arrival process
(to the checkout counters) as a Poisson process with a constant arrival intensity of 3
customers per minute. The service time in a checkout station is on average 30 seconds
per customer and will, in this initial model, be considered constant. Inspired by the
successes of a local bank, Safeway wants to model a situation with one single line to
both checkout counters. As soon as a checkout is available the first person in the queue
will go to this counter. After the customers have paid for their goods they immediately
leave the store. The store is open 24/7 and it is reasonable to run the simulation for
1 week (10080 minutes). (Hint: Use two separate Activity blocks to model the two checkouts.
Remember to set the “maximum items in activity” to one.)
What is the average queue length?
What is the average waiting time in the queue?
What is the utilization of the checkout counters?
(Hint: Look at the results tabs in the relevant blocks.)
b)
Remember to save each model separately (use “save model as” to continue building on
the same model). After closer investigation, it is clear that the service time is not constant but rather normally distributed with mean =30 seconds and standard deviation
=15 seconds. (Hint: This can be set directly in the Activity blocks.)
What is the effect of the additional variability compared to the results in a)?
c)
Now Safeway would like to analyze the customer cycle times. To record the time when
each customer enters the system (i) place a Set block (Item library) directly after the Create block. Open the Set block and click the first row under property name. Choose New value attribute and give it an appropriate name (e.g., CycleTime). Then (ii) place a Simulation variable block (Value library) beneath the Set block and connect it to the Set block.
Open the Simulation variable block and check that it is set to Current time. To record when
customers leave the system and calculate the cycle times (iii) place a Select item in block
(Item library) after the two Activity blocks. Open the Select item in block and choose merge
(this combines the two flows from the check-out counters into one). Finally, (iv) place
2
an Information block (Item library) after the Select item in block (right before the customers
leave through the Exit block). Open the Information block and choose the correct timing
attribute.
What is the average cycle time for a customer?
What is the maximum cycle time for a customer?
d)
Plots are useful for showing how the system state varies over time. For instance, one
might be interested in knowing how the queue length varies during the course of the
simulation. (Hint: Connect a Plotter, discrete event block (Plotter library) to the L-connector of
the Queue block.)
When does the queue reach its maximum length?
e)
When building large models, it quickly becomes tedious to collect data from the results
tabs in the individual blocks. A better way to collect data is to use the Statistics block
(Value library). This block automatically gathers data from the Queue and Activity blocks
as well as a few other types of blocks (it should not be connected). Use two separate
blocks and set one to queues and one to activities.
The Statistics block cannot gather cycle time data from the Information block directly. Fortunately, any block’s results can be added to the Statistics block by using the Clone Layer
feature. Add an additional Statistics block and set it to report mixed blocks. Click the
Clone Layer icon (which looks like a mouse pointer with a circle beneath it) in the icons
menu. Now open the Information block and drag the average cycle time box over to the
Statistics block, then drag the maximum cycle time box as well. The average/maximum
cycle times should now appear in the Statistics block when the model is run. (Hint: Giving each block an individual label makes it easier to identify it in the Statistics block.)
Run the simulation and verify that the Statistics block has gathered all necessary data
correctly. Do you get the exact same results as in b) and c)? If not, why?
f)
To be able to analyze the effect of different queuing configurations Safeway wants a
model where each checkout counter has its own queue. When a customer arrives to the
checkout point he/she will of course choose the shortest line. The customer is not allowed to switch queue after he/she has made the initial choice. (Hint: Use the Equation
(I) block (Item library) to determine the shortest queue (the current queue lengths are available
at the L-connectors of the Queue blocks). Use a Select Item out block (Item library) to route customers to the correct queue. For details, see pages 327-329 and Figures 8.53-8.55 in the Laguna&Marklund coursebook.)
Can you see any differences in system performance compared to the previous queue
configuration in e)?
g)
Make sure that you have saved your models so that they are available for use in Datorövning 2. Present your findings to one of Safeway’s representatives and make sure
that they note your name before you leave the classroom.
3
Datorövning 2 - The Grocery Store II
I denna datorövning fortsätter vi att lära oss grunderna i ExtendSim genom att bygga vidare
på modellerna från Datorövning 1. Närvaro är obligatorisk på denna datorövning.
Innan tillfället för Datorövning 2 ska två förberedelseuppgifter utföras:
1. Alla uppgifter från Datorövning 1 ska vara utförda och modellfilerna tillgängliga vid
övningens start. Dock är det inte ett krav att man är godkänd på Datorövning 1.
2. Läs kapitel 8.5-8.7 (s. 298-310), kapitel 8.10 (s. 316-318) och kapitel 8.12 (s. 325-331) i
Laguna&Marklund-kursboken (andra upplagan). Notera att man inte kan använda
första upplagan eller tidigare års kurskompendier.
Följande regler gäller för Datorövning 2:
 Endast studenter som är anmälda till aktuellt pass får deltaga vid övningen.
 Endast studenter som utfört förberedelseuppgifterna får deltaga vid övningen.
 Uppgifterna ska utföras i grupper om 2-3 studenter.
 Varje uppgift (a-b) ska sparas i en separat fil (använd ett separat ”model worksheet”
för varje uppgift). Se till att ni sparar dessa filer så att de är tillgängliga som stöd när
ni löser inlämningsuppgifterna.
 Gruppen ska redovisa sina lösningar och godkännas av övningsledare innan ni lämnar salen.
 Om man inte hinner färdigt på utsatt tid eller inte kan närvara vid övningen (eller om
man inte uppfyller kriterierna ovan) så ska man individuellt, senast en vecka efter
övningstillfället, lämna in lösningar till samtliga uppgifter tillsammans med en skriftlig rapport i pdf-format innehållande svar på samtliga frågor. ExtendSim-filer och
rapporten skickas till [email protected].
Checklista för att närvara vid Datorövning 2:
□
□
Samtliga gruppdeltagare har bekräftats vara anmälda till aktuellt pass
Förberedelseuppgifterna är godkända
5
The Grocery Store II
Safeway feels that the setup with one long line to the two checkout counters might deter customers from entering the store. Therefore, we will continue building on the model with two
separate queues (model f) in Datorövning 1).
a) To make the model more realistic Safeway also wants to include the time customers
spend in the store walking around and picking up their groceries. Empirical investigation has shown that there are basically two types of customers that need to be
treated somewhat differently.
Type 1: The light shopper who only buys a few items
 About 60% of the customers arriving to the store.
 The shopping time follows a triangular distribution with a most likely value
of 5 minutes, a minimum value of 2 minutes and a maximum value of 8
minutes.
 The service times for these customers at the checkout counter are exponentially distributed with a mean of 15 seconds.
Type 2: The heavy shopper who buys a bunch of items
 Represents about 40% of the arriving customers.
 The shopping time is triangularly distributed with a most likely value of 10
minutes, a minimum value of 5 minutes and a maximum value of 15 minutes.
 The service times for these customers at the checkout counter are exponentially distributed with a mean of 54 seconds.
The total arrival process to the store is still a Poisson process with a mean of 3 customers per minute.
Safeway now wants to measure:



The average number of customers in the entire grocery store.
The average cycle time for any given customer.
The separate average cycle times for heavy and light shoppers.
Hints: Because we have different customer types, we cannot set the distribution of the shopping and checkout times directly in the activity blocks. Instead, by using attributes we will
add this information directly to each customer that enters the store. The basic idea is to:
1. Use a Select item out block (Item library) to separate heavy and light customers
based on probability. Place this block directly after the Set block in the original
model.
2. Use two different Set blocks (one for each flow) to create the necessary attributes.
Random values can be assigned to an attribute by using Random number blocks
(Value library).
3. Use a Select item in block (Item library) to merge the two flows again before the
customers go walking around the store and picking up groceries.
4. Open the Activity blocks and make the necessary changes.
6
b) Now go back to model b) in Datorövning 1. That is, there is a single line to the checkout counters (as previously with normally distributed service times with mean =30
and standard deviation =15 seconds), and we disregard customer types and the time
spent shopping. Assume now that there is limited service capacity in form of limited
number of employees. There are only two workers in the grocery store, and each
worker can work as a cashier, but also has duties to unpack groceries in the store.
Transports of goods arrive to the store according to a Poisson process with intensity
8 per day (a day is 24 hours). If a checkout becomes empty and there is a waiting
transport of goods to be unpacked, the worker leaves the checkout and starts to unpack the goods from the waiting transport. The time to finish the task of unpacking is
distributed according to a lognormal distribution with mean 30 minutes and standard
deviation 7 minutes. If the worker has started to unpack a transport of goods, the
worker will complete the task before going back and serving a potential customer at
the checkout counter.

What is the utilization factor for the workers as a resource?
Hints: Use the Resource item pool (Item library) to model the workers. Use Batch and Unbatch blocks (Item library) to batch/unbatch the worker with the customer/delivery. Do not
forget to tick “preserve uniqueness”. See Laguna&Marklund pages 309-310 for further details. In this exercise it easier to use a single Activity block instead of two separate blocks to
model the checkout counters. Hopefully, your model will look something like this:
Two more important hints:
 We want the workers to stay in the pool until there is a customer/delivery that needs
them and vice versa. This is achieved by ticking the “delay kit” boxes in the Batch
blocks.
 We want the workers to prioritize customers before deliveries. The sequence in which
the connections are drawn from the Resource item pool block to the Batch blocks determines this priority (first connection = highest priority).
c) Present your findings to one of Safeway’s representatives and make sure that they
note your name before you leave the classroom.
7
SIM
Inlämningsuppgift 1 - The LeedsSim Factory
I denna uppgift ska ExtendSim användas för att analysera flödet hos ett tillverkande företag,
LeedsSim. Till er hjälp har ni handledningstillfällen (se kursschemat). Närvaro är inte obligatorisk på dessa handledningstillfällen. Dock är möjligheten att få hjälp utanför dessa tillfällen
högst begränsad. Utnyttja handledningstillfällena genom att komma väl förberedda!
Följande regler gäller för Inlämningsuppgift 1:
 Uppgiften utföres i grupper om 2-3 studenter.
 Endast studenter som är anmälda till aktuellt handledningstillfälle får deltaga vid tillfället.
 En skriftlig rapport och modellfiler ska vara inlämnade senast 2015-09-28 kl 1200 (mer
om detta nedan).
Redovisning av ert uppdrag och formalia:
Uppgiften redovisas i form av en välskriven och välstrukturerad teknisk rapport. Rapporten
ska beskriva problemet (ert uppdrag), er ansats för att angripa/lösa det, er analys samt era
resultat och slutsatser. Bilagor kan användas för att redovisa tekniska beräkningar eller data
som ni använder för er analys. De konkreta uppgifterna måste givetvis besvaras ordentligt.
Relevanta ExtendSim-modeller ska skickas till [email protected] och refereras till i
rapporten. VIKTIGT! Innan ni skickar modellerna måste de läggas in en zipfil. Denna zipfil
ska namnges med gruppmedlemmarnas namn. Ange också i ert e-mail alla gruppmedlemmarnas namn. Rapporten med alla gruppmedlemmarnas namn på framsidan lämnas i pappersformat direkt till Fredrik Olsson eller läggs i den blå lådan märkt ”Inlämningsuppgifter
Produktionsekonomi” på våning 3 i M-huset.
9
The LeedsSim Factory
The LeedsSim factory is a traditional assembly facility working as a subcontractor to the telecommunications industry. Their main product is a switchboard cabinet used in the 4th generation (4G/LTE) network base stations. The product is available in two versions: Standard and
Delux. The company has been very successful in increasing sales and with the 4G expansion
taking off in Europe, orders are piling up. On average 40% of the orders are for Delux and
60% are for Standard. Unfortunately, the operations department has had some problems
with reaching the desired (and necessary) productivity. They have therefore decided to seek
your help to create a simulation model of the involved processes as a tool for analyzing and
improving the production process.
To find the right level of detail in the model description, they urge you to start with a simple
model and then successively add more details until a suitable model with the right level of
complexity is obtained. The simulation should be run over a two-month period of 8-hour
workdays (eight weeks 5 working days per week).
A schematic flowchart of the manufacturing process is depicted below.
Storage of inbound material
Parallel operations
(Workstation 1-2)
Assembly
(Workstation 3)
Painting
(Workstation 4)
Inspection
(Workstation 5)
1
3
2
4
5
Raw material arrives by truck once every week (on Monday morning) to the storage area for
inbound goods. Every shipment contains 21 units each of three different raw materials, A, B
and C. A cabinet consist of one unit each of these three raw materials. Workstation 1 requires
one unit each of raw material A and B to produce subcomponent 1. Workstation 2 requires
one unit of raw material C to produce subcomponent 2. The subcomponents made in workstations 1 and 2 are the same for both Standard and Delux.
The difference between the two products materialize in the assembly and painting operations. In Workstation 3 (the assembly operation) subcomponents 1 and 2 are assembled into a
cabinet. The assembly operation is different for Standard and Delux as shown by the difference in processing times in Table 1.
The painting operation in Workstation 4 also follows different time distributions for standard and Delux cabinets, see Table 1. Only one cabinet at a time can be painted, and there is
no place to store painted cabinets in the paint shop. If the cabinet is not removed, the paint
shop is blocked and no new cabinets can be painted.
10
The inspection of painted cabinets in Workstation 5 is done in exactly the same way for
Standard and Delux. The inspection is carried out by a worker with special training. At the
moment, only one employee in the company has the necessary training to carry out inspections. The production manager at LeedsSim has collected data regarding the inspection
times. After having performed a chi-square-test, he concluded that the inspection time can be
modeled as an exponentially distributed variable with mean 1.2 hours. After completed and
approved inspection, the finished cabinets leave the factory. The cabinets are immediately
transported by truck either to a central warehouse or directly to the customer.
It is noteworthy that currently each workstation can only process one item at a time. Moreover, the physical layout of the plant allows for buffers of components before and after Workstation 1, 2, 3 and 5, but only before Workstation 4 (the paint shop).
The internal logistics within the plant is such that the transportation times for incomplete
cabinets can be neglected. However, to transport fully assembled cabinets to and from the
paint shop, a special type of forklift truck is needed. The transportation time from the assembly line to the paint shop is exponentially distributed with a mean of 45 minutes. The transportation time between the paint shop and the inspection station on the loading dock is normally distributed with mean 60 minutes and standard deviation of 15 minutes. Cabinets that
pass inspection are immediately picked up by the contracted transportation company. After
a completed delivery, the forklift truck always returns to the strategically located parking
area to get new instructions. The travel times between the parking area and its various destinations are negligible. There is currently one forklift truck available in the plant.
In order to adequately describe the process, it is also important to recognize that not all
painted cabinets pass inspection. On average, 10% of the Standard cabinets and 30% of the
Delux cabinets fail inspection. A cabinet that fails the inspection is put aside in a buffer and
then transported with the forklift truck to be reworked at another facility (you do not need to
model the rework facility). The transportation time to the rework facility is approximately
30 minutes, and can for our purposes be considered constant (times to and from the parking
area are still considered to be zero). The orders for the forklift truck are to prioritize; firstly,
transportation from the paint shop to the inspection, secondly, transportation from the inspection to the rework facility, and lastly, transportation from the assembly to the painting
operation (Hint: when using a Resource item block the order in which you place the connectors determines the priorities of the resource).
The performance measures that LeedsSim is interested in are:




The throughput (number of cabinets produced of Standard and Delux, respectively).
Work in process (number of units of raw material in the system).
The inventories at different parts of the workshop, including inbound storage (for instance, mean/maximum buffer levels, mean/maximum buffer waiting times).
The cycle time for a job before and after assembly. More precisely, (1) the cycle time
for a unit of raw material measured from the instance it arrives to the inbound storage area until one of each subcomponent reaches the buffer before workstation 3, (2)
the cycle time for Standard and Delux cabinets, respectively, measured from the mo-
11

ment one of each subcomponent reaches the buffer before workstation 3 until the inspection is completed.
Utilization factors of the workstations and equipment such as the forklift truck.
Table 1. Estimated processing time distributions.
Workstation
Product
Processing
time distribution
1
Standard, Delux
Triangular
2
Standard, Delux
Lognormal
3
Standard
Triangular
Delux
Triangular
Parameter values (hours)
Min=1; Max=2; Most likely=1.5
Mean=2; Std.Dev = 0.5
Min=1; Max=3; Most likely=2
Min=1.5; Max=4; Most likely=2.5
4
Standard
Delux
Triangular
Triangular
Min=2; Max=4; Most likely=3
Min=2; Max=4; Most likely=3.5
5
Standard, Delux
Exponential
Mean=1.2
Issues that LeedsSim want you to analyze and provide answers to under your contract:
1) Describe the production process graphically in a flow chart and verify it with one of
LeedsSim’s representatives (you can use pen and paper and you do not have to include this in your final report). Be careful to include as much of the logic as possible.
The purpose is to make sure that you fully understand the process before you start
building the ExtendSim model. LeedsSim has experienced problems with consultants
that have not validated the models they have built, which has been costly for the
company.
2) Build a simulation model of the production process in ExtendSim.
3) Use the simulation model to analyze the existing production process. Run the simulation 50 times and estimate the mean of the relevant performance measures (the ones
mentioned above) with 95% confidence intervals. What conclusion can be drawn? Is
production running smoothly? Where are the bottlenecks? Does the system appear to
reach some kind of steady state during the two-month period? Etc…
(Hints:
 LeedsSim is only interested in the cycle times, etc. expressed in work hours. You do not
have to take into consideration that production is shut down for 16 hours a day. This applies to the entire assignment.
 To efficiently collect the data and analyze it, use the Statistics blocks. To estimate means
and confidence intervals based on multiple runs, make sure that Runs = 50 in the Simulation setup menu and that the Statistics blocks are set to “multirun analysis” in the options tab.
 Assign appropriate labels to relevant blocks. There is a useful option to “ignore blocks
without labels” in the Statistics block.
 As shown in previous exercises, the clone layer tool can be used in combination with a
Statistics block to estimate the cycle times and throughput.)
12
4) How can the production process be improved? LeedsSim needs to increase productivity (and thereby reduce costs). Based on your understanding of the production
process, suggest at least two design changes and try them out! What are the benefits
for tied up inventory, cycle times and throughput? What are your conclusions? What
is your recommendation to LeedsSim as to how to improve their operations?
Clearly, your improvement suggestions are associated with implementation costs.
However, your analysis does not need to include a specification of these costs.
LeedsSim is at this stage only interested in the improvement potential of different solutions. The costs associated with their implementation is weighed in at a later stage,
when the decision about which changes to implement is made.
13
OPT
Inlämningsuppgift 2 - Goldfinger Incorporated
I denna uppgift ska ni hjälpa en handsktillverkare, Goldfinger Inc., att formulera ett optimeringsproblem.
Följande regler gäller för Inlämningsuppgift 2:
 Uppgiften utföres i grupper om 2-3 studenter.
 En skriftlig rapport ska vara inlämnad senast 2015-10-01 kl 1200 (mer om detta nedan).
Redovisning av ert uppdrag och formalia:
Uppgiften redovisas i form av en välskriven LP-problemformulering. Formuleringen ska
bestå av variabeldefinitioner, målfunktion, bivillkor och variabelbegränsningar i nämnd
ordning (datorskrivet). Rapporten med alla gruppmedlemmarnas namn på framsidan lämnas i pappersformat direkt till Fredrik Olsson eller läggs i den blå lådan märkt ”Inlämningsuppgifter Produktionsekonomi” på våning 3 i M-huset.
15
Glove production
Goldfinger Incorporated manufactures women’s fashion gloves. Each style will be made in a
range of sizes and colors. As a result of an extensive marketing survey, the company has selected four styles to be produced during a two-month period and is confident that it will be
able to sell all it produces.
The accounting department has submitted production cost information (except for leather
costs), while the marketing and sales group has submitted the wholesale price for each style,
as outlined in Table 1.
Table 1. Sales prices and production costs (excluding leather costs).
Style
Wholesale price ($)
Production cost ($)
1
8.00
2.40
2
7.25
2.25
3
8.70
2.85
4
7.40
2.10
The production department has identified three critical resources: knitting machine time,
looping machine time, and inspection time. In the first month there will be 20,000 hours of
knitting time, 3,000 hours of looping time, and 2,500 hours of inspection time available in the
respective machines. The required per unit time in each department for each style is shown
in Table 2. These resource figures hold for each month. In addition, overtime can be used in
the knitting department at a cost of $1.5 per hour. There are 2,000 overtime hours available in
month 1 and 1,500 hours in month 2.
Table 2. Production times per unit in the different departments.
Style
Knitting (hours)
Looping (hours)
Inspection (hours)
1
0.8
0.085
0.05
2
0.65
0.12
0.03
3
0.95
0.09
0.05
4
0.85
0.095
0.05
The basic raw material is leather, of which 10, 9, 12 and 8 units respectively are required for
each style of glove. The initial inventory of leather is 250,000 units, and the cost of using the
leather in initial inventory is supposed to be 0. More leather can be purchased when needed.
In month 1, a maximum of 100,000 units of leather can be bought from a bankrupt’s stock at
a cost of $0.1 per unit and an unlimited amount from an ordinary seller at a cost of $0.2 per
unit. In month 2, it is possible to buy an unlimited amount from the ordinary seller and the
price is expected to rise to $0.25 per unit. Any available units of leather at the end of each
month incur an inventory holding cost of $0.01 per unit. The maximum inventory that is
possible to store at the end of each month is 250,000 units of leather.
Goldfinger Inc. is interested in determining the optimal production level for each style of
glove in order to maximize profits. Although the marketing department can sell all the company’s production, it is committed to selling at least 1,000 units of each style each month.
16
Uppgifter:
1. Formulera en linjärprogrammeringsmodell som maximerar vinsten för handsktillverkningen för de båda månaderna.
17
INT
Inlämningsuppgift 3 - Choice AB
I denna uppgift ska ni hjälpa företaget Choice AB att planera sin verksamhet. Här kommer ni
använda optimeringsmetodik för att generera (förhoppningsvis) bra kandidatlösningar, och
sedan använda simuleringsmetodik för att utvärdera er lösning. Detta speglar ett vanligt sätt
att arbeta integrerat med de två metodikerna. Till er hjälp har ni handledningstillfällen (se
kursschemat). Närvaro är inte obligatorisk på dessa handledningstillfällen. Dock är möjligheten att få hjälp utanför dessa tillfällen högst begränsad. Utnyttja handledningstillfällena
genom att komma väl förberedda!
Följande regler gäller för Inlämningsuppgift 3:
 Uppgiften utföres i grupper om 2-3 studenter.
 Endast studenter som är anmälda till aktuellt handledningstillfälle får deltaga vid tillfället.
 En skriftlig rapport och modellfiler ska vara inlämnade senast 2015-10-13 kl 1200 (mer
om detta nedan).
 De optimeringsproblem som formuleras löses i MS Excel. En guide till problemlösaren i MS Excel finns bifogad i slutet av denna uppgift. Gå igenom varje steg i denna
guide noggrant innan ni ger er i kast med huvuduppgiften.
Redovisning av ert uppdrag och formalia:
Uppgiften redovisas i form av en välskriven och välstrukturerad teknisk rapport. Rapporten
ska beskriva problemet (ert uppdrag), er ansats för att angripa/lösa det, er analys samt era
resultat och slutsatser. Bilagor kan användas för att redovisa tekniska beräkningar eller data
som ni använder för er analys. De konkreta uppgifterna måste givetvis besvaras ordentligt.
Relevanta ExtendSim- och Excelfiler ska skickas till [email protected] och refereras till
i rapporten. VIKTIGT! Innan ni skickar filerna måste de läggas in en zip-fil. Denna zip-fil ska
namnges med gruppmedlemmarnas namn. Ange också i ert e-mail alla gruppmedlemmarnas namn. Rapporten med alla gruppmedlemmarnas namn på framsidan lämnas i pappersformat direkt till Fredrik Olsson eller läggs i den blå lådan märkt ”Inlämningsuppgifter Produktionsekonomi” på våning 3 i M-huset.
19
Choice AB
Företaget Choice AB tillverkar tre olika produkter, fantasifullt benämnda P1, P2 och P3.
Marknaden för de tre produkterna är mycket god och allt som tillverkas kan också säljas.
Kunderna kräver dock bindande kontrakt vid planeringsperiodens början på hur mycket
företaget skall leverera i slutet av densamma. En planeringsperiod motsvarar 31 stycken 8
timmars arbetsdagar. Underlåtelse att uppfylla ingångna avtal är förenat med mycket kännbara skadeståndskrav. Det är därför av yttersta vikt att företaget kan hålla vad de lovar. Choice AB som är ett vinstmaximerande företag står nu i begrepp att teckna leveransavtal med
sina kunder inför den kommande planeringsperioden. Problemet är således att bestämma en
genomförbar produktionsplan som maximerar vinsten.
Försäljningspriserna för respektive produkt är 1100 kr/st för P1, 1000 kr/st för P2 och
880 kr/st för P3. Dessutom har företaget krav på att tillfredsställa redan ingångna avtal och
måste därför minst tillverka 20 st P1, 15 st P2 samt 12 st P3.
Produktionsprocessen består i all sin enkelhet av maskinbearbetning i tre olika maskiner
samt en avslutande montering. Produkterna P1 och P2 kräver bearbetning i alla tre maskinerna och passerar dessa i ordningsföljden M1, M2 och M3. Produkten P3 bearbetas dock
endast i maskinerna M1 och M2 (i denna ordning). Efter maskinbearbetningen genomgår
samtliga produkter en avslutande montering i monteringsstationen (Mont).
Produktionsledningen på Choice AB har bestämt att först producera hela orderstocken av
P1, därefter alla P2 och slutligen samtliga P3. Transporttiderna mellan maskinerna är försumbar och för tidplaneringen tillämpas fullständig överlappning. Detta innebär att så snart
en produkt är färdigbearbetad i en maskin är den tillgänglig för efterföljande arbetsstation.
Efter ett intensivt effektiviseringsarbete och tack vare produkternas likartade karaktär är
ställtiderna försumbara (detta innebär bland annat att montering av P3 får påbörjas även om
vissa P1 eller P2 fortfarande befinner sig i maskinen M3).
Under en längre tid har företaget gjort uppföljning på den produktions- och monteringstid
som respektive produkt kräver i M1, M2, M3 och Mont. De genomsnittliga produktionstiderna samt tillhörande standardavvikelser (angivna inom parenteser) står att finna i Tabell 1
nedan. Där finns också den tillgängliga kapaciteten för den kommande planeringsperioden
uttryckt i antal tillgängliga timmar för respektive resurs. Att den tillgängliga kapaciteten för
respektive arbetsstation är lägre än planeringsperiodens längd i antal timmar beror på nödvändigt underhållsarbete som kan antas utföras vid ur produktionssynpunkt lämpliga tidpunkter.
Tabell 1. Uppmätta genomsnittliga produktionstider (h/st) med tillhörande standardavvikelser angivna inom parantes tillsammans med totalt tillgänglig tid av respektive resurs under den närmsta
månaden
Produkt
M1
M2
M3
Montering
P1
1,8 (1,0)
1,5 (1)
1,0 (0,4)
0,8 (0,4)
P2
1,2 (0,6)
2,2 (1,4)
0,9 (0,6)
1,0 (0,6)
P3
2,0 (1,2)
1,8 (1,2)
1,2 (0,2)
Tillgänglig tid
200 h
220 h
180 h
200 h
20
De beräknade driftskostnaderna för de fyra arbetsstationerna finns angivna i Tabell 2 nedan.
Tabell 2. Driftskostnader vid de fyra arbetsstationerna.
M1
M2
M3
Montering
100 kr/h
120 kr/h
110 kr/h
80 kr/h
För att tillverka produkterna i fråga åtgår också en hel del insatsmaterial och inköpta komponenter, se Tabell 3 nedan.
Tabell 3. Materialkostnader för respektive produkt.
P1
P2
P3
250 kr/st
210 kr/st
180 kr/st
Företaget har också två andra kostnadsposter direkt relaterade till produktionen av de tre
produkterna under den kommande planeringsperioden. Dessa två är hyra av lokal och diverse produktionsutrustning på 5 000 kr samt lönekostnader för en produktionschef på
15 000 kr.
Uppgifter:
1.
Bestäm en optimal produktionsplan för Choice AB under förutsättning att alla produktionstider är deterministiska och lika med de uppmätta genomsnittliga värdena i Tabell 1.
a) Vilka är de trånga sektorerna?
b) Inom vilka gränser kan tidsåtgången i M2 variera utan att baslösningen byts?
c) Hur mycket är Choice AB villiga att maximalt betala för att öka kapaciteten i M1
med 20 h?
d) Vilket är det lägsta pris Choice AB kan tänka sig att sälja P1 för utan att överväga
att revidera den framtagna produktionsplanen?
e) Hur mycket är Choice AB beredda att betala för att öka kapaciteten i monteringen med 10 h?
2.
Är den framtagna produktionsplanen genomförbar? Konstruera en simuleringsmodell
över produktionsprocessen och undersök om den totala genomloppstiden understiger
planeringsperioden (= 31 st 8 timmars arbetsdagar). Den totala genomloppstiden (G) definieras som tiden från det att första produkten börjar produceras tills dess den sista
produkten är helt färdigmonterad (tips: Ni kan använda ett Mean and Variance-block (Value
library) tillsammans med ett Information-block (sammankopplade och inställda på lämpligt vis)
för att mäta den totala genomloppstiden. Det är svårt att använda det vanliga Statistics-blocket
för detta).
a) Undersök först situationen då alla produktionstider är konstanta och lika med
medelvärdena givna i Tabell 1.
b) Vad händer om produktionstiderna istället följer en lognormalfördelning med
väntevärde och standardavvikelse enligt Tabell 1? Kör ett antal (förslagsvis 100)
simuleringar, registrera realiseringen av genomloppstiden, G, i varje körning (G
betecknar här den stokastiska variabel som beskriver den totala genomloppsti-
21
den). Använd detta stickprov för att skatta genomloppstidens medelvärde, G,
och standardavvikelse, G. Antag att genomloppstiden följer en normalfördelning, 𝐺 ∈ 𝑁(𝜇𝐺 , 𝜎𝐺 ). Vilken är sannolikheten att Choice AB kan genomföra den
framtagna produktionsplanen under den aktuella planeringsperioden? Motivera
också varför antagandet att G följer en normalfördelning är rimligt.
3.
Undersök hur produktionsplanen i uppgift 1 förändras om bara 90 % av den angivna
tillgängliga kapaciteten kan utnyttjas i de olika arbetsstationerna. Diskutera även andra
möjliga modifieringar av den ursprungliga LP-modellen med syfte att försöka beakta
variabilitetseffekterna.
4.
Vad är sannolikheten för att den produktionsplan som ni fått fram i uppgift 3 är genomförbar? Undersök genom simulering på samma sätt som i uppgift 2.
5.
Vilken är er rekommendation till Choice AB? Hur många enheter av produkterna P1, P2
respektive P3 skall Choice AB teckna leveransavtal på och vilken blir den tillhörande
vinsten under förutsättning att leveransavtalet kan hållas? Hur högt får skadeståndskravet för icke uppfyllt leveransavtal maximalt vara för att den förväntade vinsten för planeringsperioden skall vara större än noll?
22
Guide till problemlösaren i MS Excel
Arbeta igenom denna guide om hur man löser optimeringsproblem med Excel. För ökad förståelse är
det också rekommenderat att (för hand) göra en grafisk känslighetsanalys av problemet nedan och jämföra denna med den känslighetsanalys som Excel genererar. (Observera att utseendet på dialogrutor
m m kan skilja sig mellan olika versioner av Excel.)
Problemlösaren i Excel är ett enkelt verktyg för att lösa optimeringsproblem (såväl linjära
som olinjära). För att illustrera hur problemlösaren används så betraktar vi hur följande
enkla exempel kan lösas med Excel:
Max 𝑍 = 4𝑥1 + 6𝑥2
då 3𝑥1 + 2𝑥2 ≤ 18
2𝑥1 + 4𝑥2 ≤ 16
𝑥1 , 𝑥2 ≥ 0
I Figur 1 ses ett sätt att ställa upp problemet i ett tomt kalkylblad.
Figur 1. Exempel på problemuppställning i Excel för ett LP-problem.
Den inlagda texten i kalkylbladet tjänar endast som ledtexter för att göra modellen mer överskådlig och lättläst. Cellerna B3 och C3 används för noteringar av det sökta antalet enheter
för variabel 𝑥1 och 𝑥2 . I cell D3 beräknas det maximala målfunktionsvärdet utifrån värdena
på beslutsvariablerna i B3:C3. Initialt kan det vara lämpligt att ange värdet 0 i cellerna B3 och
C3. På så sätt markerar man en initial nollösning till LP-problemet.
Vi har definierat celler för målfunktionskoefficienter B4:C4, bivillkorskoefficienter B5:C6,
samt högerledskoefficienter G5:G6. I cellerna E5:E6 beräknas vänsterledet, d v s värdena på
bivillkoren 3𝑥1 + 2𝑥2 och 2𝑥1 + 4𝑥2 , för angivna värden på beslutsvariablerna. Ett enkelt sätt
att göra denna beräkning i Excel är att använda ”Produktsumma” (engelska ”Sumproduct”).
T ex, cell E5 har innehåll: =PRODUKTSUMMA(B3:C3;B5:C5), som är samma sak som
B3*B5+C3*C5. På motsvarande sätt blir innehållet i vänsterledet i cell E6:
=PRODUKTSUMMA(B3:C3;B6:C6). För målfunktionsvärdet i cell D3 kan innehållet ses i Figur 1.
23
När värden och formler har matats in ska problemet definieras i problemlösaren. Problemlösaren hittas under fliken ”Data”, se Figur 2. (Om problemlösaren inte finns installerad hittas den via “Arkiv” > ”Alternativ” > “Tillägg”, klicka på “Gå”, bocka för “Problemlösaren” i
listan och klicka på “OK”.)
Figur 2. Klicka på fliken ”Data” och du hittar Problemlösaren längst till höger.
Då Problemlösaren öppnas uppträder ett fönster enligt Figur 3.
Figur 3. Dialogfönster för Problemlösaren.
I dialogfönstret som visas i Figur 3 ska följande specificeras:
 Målsättning: Anger den cell där målfunktionsvärdet är definierat (i vårt fall cell D3).

Max/Min: Ange om problemet är maximerings- eller minimeringsproblem.
24

Variabla celler: Anger de celler som innehåller beslutsvariablerna (i vårt fall cellerna
B3:C3).

Begränsningar: Dessa definieras genom att klicka på ”Lägg till”, då ett nytt fönster
öppnas, se Figur 4. Här anges cellerna för vänsterleden, relation respektive cellerna
för högerleden. Observera att det är i detta dialogfönster man anger relationen
(≤, ≥, =), alltså inte direkt i Excel-bladet.
Figur 4. Dialogfönster för att lägga till ett bivillkor.

Icke-negativa variabler: Om alla variabler i modellen är icke-negativa, så kan detta
markeras genom att klicka på ”Gör obegränsade variabler icke-negativa” (annars får
man lägga till dessa variabelbegränsningar själv i ”Begränsningar”).

Lösningsmetod: Här kan man ange om det är en linjär modell man vill lösa genom
att välja lösningsmetoden ”Simplex LP”.
Efter alla dessa inställningar är gjorda är vi redo att lösa optimeringsproblemet. Detta görs
genom att klicka på ”Lös” i Problemlösaren. Om t ex problemet skulle sakna lösning (mot
förmodan) eller något annat problem såsom att problemet är olinjärt fast att man valt metoden ”Simplex LP”, så kommer Problemlösaren att upplysa om detta. Om allting är som det
ska vara så hittar Problemlösaren en lösning, se Figur 5.
Figur 5. Lösningsrapport.
25
Genom att markera rapporterna ”Resultat” och ”Känslighet” och sedan trycka ”OK” dyker
resultatrapport och känslighetsanalys upp i Excel-arket, se Figurerna 6 och 7.
I resultatrapporten ges information om målfunktionens optimala värde samt värden på variablerna i optimum. Här ses också vilka bivillkor som är bindande (uppfyllda med likhet). I
känslighetsrapporten fås värdefull information, såsom skuggpriser och tillåtna ökningar/minskningar av koefficienter för att optimum fortfarande ska vara detsamma.
Figur 6. Resultatrapport.
26
Figur 7. Känslighetsrapport.
Gör nu även en grafisk känslighetsanalys av problemet och jämför denna med känslighetsrapporten i Figur 7.
27