Simulation of production systems: A case study for stainless steel insulated coffee cup...
-
Upload
hafez-shurrab -
Category
Engineering
-
view
243 -
download
1
Transcript of Simulation of production systems: A case study for stainless steel insulated coffee cup...
SIMULATION OF PRODUCTION SYSTEMS
SIM’S COFFEE CUPS - PROJECT REPORT
Meng Li & Hafez Shurrab
Date
2015-01-12
ABSTRACT
In this report, a production system of a coffee cups factory is used as a case for simulation
modelling and productivity optimization. The study is based on Bank’s simulation project
methodology to systematically approach optimum results, while the theory of constraints (TOC)
is used as the main framework for the iterations of the production system improvements. The
findings prove how simulation modelling and TOC can improve the productivity of the
production system dramatically by surgically aligning investments to even out the system
capabilities.
TABLE OF CONTENT
1. INTRODUCTION _________________________________________________________ 4
1.1. Background __________________________________________________________ 4
1.2. Problem Formulation ___________________________________________________ 4
1.3. Research Questions ____________________________________________________ 4
1.4. Delimitation __________________________________________________________ 4
2. THEORETICAL FRAMEWORK _____________________________________________ 5
2.1. Discrete-Event Simulation - DES _________________________________________ 5
2.2. Simulation Project Methodology __________________________________________ 6
2.3. Theory of Constraints - TOC _____________________________________________ 7
2.4. Detection of Bottlenecks ________________________________________________ 8
2.5. Experimental Plan and Statistical Analysis __________________________________ 9
3. METHODOLOGY ________________________________________________________ 9
4. PROJECT REALISATION: ________________________________________________ 10
4.1. Identify the constraint__________________________________________________ 11
4.2. Exploit the Constraint and Subordinate Everything Else _______________________ 12
4.3. Elevate the constraint __________________________________________________ 13
4.4. Iterate ______________________________________________________________ 14
5. PROJECT RESULTS _____________________________________________________ 15
6. DISCUSSION ___________________________________________________________ 17
6.1. Extra Task A_________________________________________________________ 18
6.2. Extra Task B _________________________________________________________ 19
6.3. Extra Task C _________________________________________________________ 19 7. CONCLUSION __________________________________________________________ 21
REFERENCES ______________________________________________________________ 22
APPENDICES ______________________________________________________________ 23
1. INTRODUCTION
1.1. Background
The majority of manufacturing firms improvises in their strategy of launching new product
development projects and engineering change projects leading to dramatic failure cases of
competition and market acquisition. Many decisions toward costly investments related for
instance to space and layout are difficult to be made with long discussions and many prototypes.
Therefore, the simulation tool turned out to be handy for this era of production systems since
many aspects could be fairly analysed and lots of costly and risky conduction of real production
piloting could be avoided until getting a fairly clear perception on which combinations of
production system components could dynamically fit the current and strategic business needs.
The current situation of the production system at Sim’s Coffee Cups could not be an exception
for how coherently the production capacity is linked with the current market demand. The
problem is described in details in the following section. In this report, we show the benefits of
simulation as a tool for production systems to confront market dynamics through facilitating
solid insights into effective operational and strategic decisions including future investments.
1.2. Problem Formulation
As it is common for many manufacturers, Sim’s production capacity is not properly leveraged,
and the dramatic increase in the demand of the customizable painted coffee cups forged a new
pressure on the business due to the possible negative influence on customers because of poor
deliverability. The marketing department expects even more demand in the near future, while
the current production system regularly experiences many disruptions due to the lack of
balanced resources in the production site. For further accurate investigations on the current
situation of Sim’s production system, we use simulation to dig deeper and deeper in order to
diagnose the system deficits and corresponding changes and investments in which the
throughput can be greatly increased to fulfil the growing demand.
1.3. Research Questions
This simulation project is done to investigate possible solutions to increase Sim’s production
throughput through particular system reconfigurations and possible investments without
exceeding 150 000 € budget.
The main questions that will be answered are:
1. which system constraints are currently limiting or have high restricting potentials toward
the overall production capacity?
2. which changes on the current system configurations and plans can lead to improved
throughput?
3. what effective investments to be realised in both the short and long terms are there to
balance out the overall resource utilization and increase the production throughput as a
result?
1.4. Delimitation
In principle, the simulation study of Sim’s production system is discrete-event oriented whereby
stochastic time driven data are mainly considered when they fit and are available. In other
words, the resource data are expressed as time durations as loads pass by, and only limited
resource characteristics including quality rates and maintenance activities are connected, while
the other specific functionalities are not considered. Furthermore, this simulation study includes
the flow of materials and resource behaviour from the raw materials’ storage point (including
planning and scheduling rules) to the point where coffee cups are assembled and stored to
outgoing logistics activities. The logistics activities after assembly in turn are not simulated or
included in the study. Additionally, there are particular investments for improvements (see
Appendix A) represent the only space of solutions in which different scenarios are drawn and
alternatives are combined together.
Automod software is used to model Sim’s production system with limited graphical
representations, while Autostat is mainly used to analyse system variables in relation to
particular responses, e.g. throughput. Finally, all processes’ data are already condensed into
corresponding distributions expect painting machines, which has raw data of MTTF and MTTR
ready to be fitted to corresponding distributions.
2. THEORETICAL FRAMEWORKIn this project, many concepts and theoretical fundamentals are used as ground and supporting
factors to the related decisions and are detailed in the following sections:
2.1. Discrete-Event Simulation - DES
Simulation is defined by Ingalls (2008) as the process in which a dynamic model of an actual
system is designed and experimented with the aim of understanding the system behavior and/or
acting accordingly in terms of strategy setting and decision making back up by particular
requirement specifications or criteria. As for Discrete-Event Simulation (DES), Robinson
(2004) describes its unique characteristics as a simulation modelling based on discrete sequence
of events in time whereby the state of the system is changed accordingly. Ingalls (2008) in turn
breaks down the main structure of any DES into primary and commonly used components
including entities, events and activities, global and system state variables, resources, a calendar,
a random number generator, and statistics collectors.
The calendar for a simulation is simply the scheduled list of events that will occur when
simulation runs take place. Since the application of DES is directed to the flow of a production
system in this case, entities could be for instance the loads created according to random or
scheduling rules, while events could be the scheduled activities on the calendar that can move or
hold entities for a certain/randomly distributed period of time. As for resources, they are simply
anything included in the system with limited capacity and possibility to do particular activities
(e.g. maintenance) in order to represent realistic behavior of labour and machines over time.
Realistic behavior is mainly derived from the ability to include stochastic formulas in DES,
which is generated by random number generators (Ingalls, 2008).
Global variables are those variable that are dedicated to the entire model at all times in order to
track especially interesting results such reorder point effect. System state variables are in turn
those variables related to the current state of simulation such as simulation time, which means
that they are continuously updated as simulation time goes by. Finally, statistics collectors are
those tracking features used to collect related statistics of the simulated model. A common
variable to track is for instance the utilization of a resource (Ingalls, 2008).
DES has both strengths and weaknesses. The first strength stems from the fact that simulation in
general supports experimentation without disturbing the real system of production. DES in
particular has the ability to process stochastic behaviour, and thus, consider system dynamics,
enabling quicker analysis and solution adapting. DES enables common perception of system
dynamics through its visual and pedagogical features. On the other hand, DES is time
consuming and requires a lot of critical data to be accessed. Above all, the results of DES may
give precise impression although there might have been invalid input data considered. Finally,
human decisions are most of the time difficult to model (Ingalls, 2008).
2.2. Simulation Project Methodology
Banks (2010) introduced the main steps commonly followed in simulation studies as shown in
figure 2.1. Problem formulation is the statement of the problem that clearly declares the main
problem in the current system. Sometime, the problem statement is reformulated as the project
progresses due to the new facts exposed while analysing the system. Then, the objectives of the
project plan are specifically set, which are in fact the questions answered by simulation such as
what alternatives there are and how much the change required will cost to improve the current
system in accordance with the project goal. After that, the model conceptualization phase comes
up whereby the essential features of the problem with affecting factors of relevance to the
problem scope are mapped as a connected network of simple, abstract and understandable
symbols that represent the relationships in the real system to characterize it and level down the
complexity. Simultaneously, relevant data is collected in a planned and organized way since it is
difficult to get acceptance within organizations to gather such data. Both the range and amounts
of data should be sufficient to efficiently represent the corresponding behaviour of the real
system entities. Therefore, this phase could be regarded as the most time-consuming phase
among other phases. After fairly representative data is available, the representative model
should be logically built and translated into relevant computer language/codes. However, it is
possible to model a system for simulation in many cases without actual coding, but the
flexibility will be compromised then. There are two types of programming languages including
general purpose simulation system (GPSS) language and special-purpose simulation software.
Arena® and AutoMod© are examples of the later type for manufacturing (production) and
material handling (logistics). Nonetheless, building models might be manageable but verifying
them require extra work. Therefore, models should be built in a way they could be quickly and
easily verified before they together with their conceptual models could be checked for being
valid representation of the real system (Banks, 2010). Figure 2.1 shows that the validation phase
can ask modellers to go back to the conceptual modelling and data gathering phase if the model
accuracy is not judged to be acceptable.
Once the model is fairly valid from any common perspective, experiments to be conducted
through the model should be properly designed so that they can eventually lead to improved
results in systematic manner (the following section clarifies this point in details) before the
production runs and analysis are implemented. Many simulation software embed statistics
experimentational features such as AutoStat in AutoMod and OptQuest in several simulation
software. The number of runs are stopped based on the degree of satisfaction of the achieved
results, commonly when very limited improvements are achieved over relatively long analysis
and run time. The achieved results are then then documented and reported using two main
types: program and progress. The earlier type is for clarifying the way the program operates in
order to gain support for and confidence in it, i.e. to be convincing for the target document
receivers. Besides, program documentation is expected to support determining the relationships
between performance output measures and input parameters for the earlier aspect to be
optimized. As for the progress report, they are not very different from any project progress
report that aim to avoid any significant delay in the project realisation. In general, project logs
provide a comprehensive record of key decisions, change requests, accomplishments, and other
important aspects. However, the analysis results and steps should be reported concisely and
clearly in a final report so that future model users can effectively review it during the
implementation phase. In principle, ultimate model users should be sufficiently involved along
the simulation project to effectively guide their contributions. Another similar and more
practical simulation project methodology was discussed by Rabi et al. (2008), see figure 2.1.
Figure 2.1: Steps in DES - in the right “source (Banks, 2010)”, in the left “source (Rabi et al., 2008)”
2.3. Theory of Constraints - TOC
Since simulation of production systems projects are done in order to improve the system’s
performance in terms of productivity, safety and ergonomics, cost and economy, and/or
environment impact, analysing the modelled system behaviour should be implemented in a
planned way according to a systematic approach (Banks, 2010). In this regard, Goldratt and Cox
(1992) highlighted a systematic way of approaching and tackling system constraints in a
productive manner. According to them, a constraint is any aspect in the system that undermines
its goal to be achieved, and they could be internal or external constraints. Constraints could be
internal when the system is incapable of delivering its value as the market demands. Therefore,
any improvements in the internal system where these constraints are located will improve the
deliverability of the system in relation to the market demand. Here, Goldratt and Cox (1992)
suggests what is commonly known as the theory of constraints (TOC), which is a management
paradigm whereby systems are perceived as being limited in achieving more of its goals by a
very small number of constraints, which are diagnosed, detected and continuously balanced out
through a series of iterated steps. These steps include:
1. identifying the system’s constraint(s),
2. deciding how to exploit the system’s constraint(s),
3. subordinating other resources to the constraint(s),
4. elevating the system’s constraint(s),
5. and going back to step 1 whenever the current constraint(s) is/are broken.
Goldratt and Cox (1992) believe the types of internal constraints could stem from 3 Ms, Man
(labour), Machine (equipment), and Management (policy). Each type could be a constraint by
preventing the system from delivering more than the current throughput is.
On the other hands, if the system has overcapacity, the constraint is said to be external, and the
organization should establish mechanisms to sell more of its products or services, which is more
of business strategists’ job (Goldratt & Cox, 1992).
2.4. Detection of Bottlenecks
According to Roser et al. (2003), the reason of having the production system
constraints/bottlenecks phenomenon is mainly the production flow losses including balance
losses (different designed cycle times between stations) and system losses (variations in
stations’ actual cycle times; production disturbances of breakdowns and small stoppages; and
interrelations between stations that may result in either blocked or starved status). Therefore,
they go to assume that these causes lead to one or combinations of possible basic indicators for
bottlenecks including:
1. high utilization,
2. shortest overall time of blocked or starved status,
3. high buffer levels upstream,
4. longest overall time of blocked resources upstream,
5. and longest overall time of starved resources downstream.
In DES, these indicators could be identified and gathered using buffer sizes in the animation
mode and buffer as well as utilization statistics and machine states in the reports generated after
the simulation is run. However, there are utilization indicator uncertainties in detecting the right
primary and secondary bottlenecks over time using these combinations of indicators. Moreover,
the buffer indicators have problems since all machines do not have buffers and buffer sizes are
limited to different capacities leading the system to be choked. Therefore, another status is used
to decide the bottleneck that is active and passive states. Active state occurs when resources
limit the product flow, which is the status of a resource when it is working, being repaired, or
under setup, while passive state occurs when the resource do not limit the product flow, which
is when the resource is either blocked (followed by full output buffer) or starving (preceded by
buffer). Long active period refers to the current bottleneck and interrupts other resources, while
short active period is interrupted by other resources, which means that the current bottleneck
could change over time leading to two main static description of the bottleneck position
including shifting and sole bottlenecks. The later position happens when only one resource
(machine) has the longest uninterrupted active period, while shifting bottleneck implies that
more than a resource has/have the longest active period. As a result, to determine the bottleneck
over time, the overall durations of shifting and sloe bottlenecks are calculated and compared for
each resource and the longest duration will be the bottle over time (Roser et al., 2003).
To back up the TOC by DES, the work procedure would be then:
1. bottleneck identifying using simulation,
2. bottleneck exploiting by testing ideas in the model,
3. trying out strategies using the model to subordinate other resources,
4. elevating the bottleneck capacity by conducting investment analysis using simulation,
5. realising the chosen investment in the real-world system,
6. and moving to the next bottleneck by returning to the first step.
2.5. Experimental Plan and Statistical Analysis
According to Carson and John (1996), in the statistical analysis, since Autostat uses the random
samples as the input data for analyses which would cause different behaviours of the stochastic
simulation models, more than a single simulation run are needed here to get a more real model.
Multiple replications instead of a single number are applied in Autostat to calculate the
confidence intervals which generate the steady-state mean value of responses. This statistical
analysis gives us an accurate performance of the real system.
There exist several kinds of analysis which could be applied in this project according to
different aims. Single scenario analysis uses confidence intervals to get various responses. On
the other hand, in multiple scenarios we also can apply same or different input parameters,
factors to find how the system behaves under some predefined conditions. And it is allowed to
define many kinds of responses we are interested in. Mostly the above analysis methods are
used to achieve such like optimal setting, experimental plans or get more complex analysis
result. In this project both of them are used to realise different tasks.
3. METHODOLOGYIn this report, we inductively study the production system of Sim’s Coffee Cups factory using
many consistent established methods, approaches and guidelines. For the main study method,
we used the steps of DES as framed by Banks (2010), which is shown in figure 2.1. The first
step of Bank’s is problem formulation, which is given and well described for Sim case in
section 1.2. The second step is setting of objectives and project plan, and that is also addressed
for great extent in sections 1.3 and 1.4 as well as in Appendix B (the project plan). As for the
conceptual model, we used the drawing of the production flow that is given in the case input as
a conceptual model since we were comfortable with it (refer to Appendix C to see the
conceptual model). As for the data, it was already collected and condensed in the case except
for the painting process where we needed to conduct input analysis for the MTTF and MTTR
values. Therefore, it is obvious that the steps from 1 to 4 were just extracted and organized from
given data and information.
In step 5, we translated the conceptual model together with the available data into computer
language that is readable by Automod, which is the software we rely on for the DES modelling.
Simultaneously, the verification (step 6) was done in accordance with Sargent (2012) whereby
the model is built and tested step by step. The verification in our case included five stages
including:
1. after the coding has been finished from the point of metal sheets delivery to the middle
storage of cup parts,
2. after the coding has been finished from the point of pellets delivery to the middle storage
of both wrappers and lids assemblies,
3. after the aforementioned branches of flow have been combined together forming one
middle storage,
4. after the coding has been finished from the point of middle storage to the conveyor before
assembly,
5. and after the coding of assembly has been included and the whole base model was
complete according to the specifications.
During the verification process, we had to build temporary final output and close some loops so
that we can verify the current progress of the model. Furthermore, we used almost all
verification techniques recommended by Sargent (2012) including cross-checking the code,
letting other groups inspect the code, using the available debugger and message printing feature
of Automod, and studying the model animation.
As the validation step (step 7) is important, there were some aspects of the original system
behavior that was pre-formulated for the case in order to be compared with such as the weekly
throughput of the base model after considering all system losses and limitations. The case
formulator who was also the Automod expert has given support in this step to ensure that the
improvements would not be built on invalid model. According to Sargent (2012), this validation
technique could be called face validation.
After the base model has been judged as fairly valid, we started to strictly follow TOC iterations
as described in section 2.4. For instance, to identify the first bottleneck, we calculated the
longest active time of a resource through state functions of Automod. Also, to subordinate other
resources, we tried to set priorities to the processes of the bottleneck. Another example is that
we picked and tested relevant investments from the list in Appendix A to elevate the bottleneck.
Finally, we continued that over and over again until we just hit the limit of the investment
budget stated in the case description, which is 150,000 Euro. It is worth mentioning that in order
to test some investments, e.g. for determining the optimum buffer levels, we used the Design of
Experiments (DoE) tool enabled by Autostat according to section 2.5. Besides, to take a
shortcut and save significant calculation time, we modelled the economic as well as other
calculations of relevance in a way they are printed directly on the animation screen as labels. In
this way, we could sensitively track the contradicted/passive changes that are limited by the
complex interrelationship of the flow entities.
The following steps of running the simulation of the production system have been
simultaneously done from the point at which the experimental plan is set. Finally, the extra
tasks (A+B) have been modelled, verified, validated, and then added to the final system model.
The whole project work is documented in this report as the last step of the DES project
methodology proposed by Bank (2010).
4. PROJECT REALISATION:By having the conceptual model (shown in Appendix B) and the data given by the case
description of Sim’s Coffee Cups, the coding of the base model could be done, then verified and
validated as mentioned in chapter 3. The complete code of the final model is attached in
Appendix D.
After the base model has been verified and fairly validated, the improvement iterations of TOC
was applied several times according to the aforementioned methodology. The next sections
clearly describe the first iteration of TOC used to detect and break the bottleneck(s) from the
point where the base model is ready to be experimented. This iteration could be also regarded as
our structured experimental plan to improve the productivity of the production system of Sim’s
Coffee Cups until the final setting of the model is reached. Both the number of iterations and the
changes in each iteration following the first iteration will be declared.
4.1. Identify the constraint
Before analysing the output of the base model runs, warm-up analysis has been done to
determine and only consider the steady-state interval, which was done by Autostat through two
responses, the total claim counts of the final buffer and final process. Figure 4.1 shows the
similarity between the patterns of two responses, which gives more credibility in the
determination of the steady-state interval. The warm-up was estimated to be according to the
following formula of Bank (2000):
Warmup Time = Steady State Time – w × Snap Length = 6 – 2 × 1 = 4 hours
Figure 4.1: Warm-up Determination Analysis
After that, by gathering the responses of all machines utilizations as shown in figure 4.2, both
painting equipment and wrapper molding seem to have the highest utilization over time.
Figure 4.2: Machines Utilizations in the Base Model
By studying the other bottleneck indicators of buffer status (starved or blocked) before and after
molding and painting machines as shown in figure 4.3, it was determined that painting machines
were the bottleneck since the buffers downstream were more blocked than for molding
machines. In contrary, the utilizations of assemblers were relatively low, meaning that they
were most of the times idle waiting for the painting machines. Besides, the interrelationship of
painting machines with other processes influenced all process up- and downstream more
significantly than the molding process did. Finally, we applied similar improvements in the
molding and painting productivity, respectively, to validate our choice of painting as a
bottleneck.
Figure 4.3: Average Time Per Claim of Buffers in the Base Model Excluding Storage Buffers
4.2. Exploit the Constraint and Subordinate Everything Else
Once the painting machines were identified as the current bottleneck and that wrapper molding
machine is the dependent second bottleneck, we tested how reconfiguring the current flow
without the need to invest could increase the throughput. By giving the priority of the
maintenance activities done by the maintenance operators to the painting then polishing
machines to exploit the constraining aspect of the painting process, we could improve the
throughput. Similarly, by giving the priority to the molding process to be maintained by its
corresponding operator, more improvement in the throughput could be realised. By applying all
these changes to subordinate the system components for the sake of the painting process, we
could realise significant throughput improvement as shown in figure 4.4.
Figure 4.4: Throughput Before and After Exploiting the Bottleneck and Subordinating Everything Else
4.3. Elevate the constraint
After the free improvements have been applied to the system, we highlighted the relevant
investments to the painting process from the list in Appendix A for investigations. Initially, it
was obvious that it was about the wrapper production since painting and wrapper molding the
first and second bottlenecks, respectively, and both machines only process wrappers. Moreover,
figure 4.2 shows significantly long overall polishing downtime and very long stamping idle
time. Therefore, the space of investigations were not limited to the painting. The focus was the
wrapper flow in the beginning, and it was planned that once no further improvements could be
realised in the wrapper flow, polishing downtime and stamping idle time would be the next
target of experiments.
By investigating all painting investments’ influence on the throughput, we choose the
investment with the biggest impact, which was adding a new painting station. It is also worth
mentioning that we used single- and multivariable analysis on Autostat to investigate the effect
of space (wrapper flow buffers), which was also promising but not enough to be our first
investment.
4.4. Iterate
The same steps were followed and repeated using the same approach until the limit of the
investment budget (150,000 Euro) was almost reached. Table 4.1 abstract the iterations. The
current bottleneck after all selected investments was the wrapper molding machine.
Table 4.1: Iterations of Bottlenecks Detecting and Breaking
Iteratio
n # Current Bottleneck Indicators
Considered Free
Reconfiguration Chosen Investment
1 Painting Machines ● Machine
Utilization
● Overall Buffer
Status
● Interrelationshi
p
● Pilot Runs
● Prioritizing
maintenance
activities for
the bottleneck
and next
bottleneck
● Secondly
prioritizing
maintenance
activities to the
machine with
relatively great
downtime
● Changing the
roles of
operators after
assuming that
they are
interchangeabl
e
New Painter
2 Painting Machines Reducing Painting
Ct by 20%
3 Painting Machines Refill Capacity
4 Painting Machines Double Painting
Batch Size
5 Painting Machines 25 Increase in
Wrapper Box Buffer
Size
6 Polishing Machines ● Machine
Utilization
● Overall Buffer
Status
Middle Storage
Expansion and
Removing One
Stamping Machine
7 Wrapper Molding Machine ● Machine
Utilization
● Overall Buffer
Status
● Pilot Runs
40% Decrease in
Molding MTTR
8 Polishing Machines ● Machine
Utilization
● Overall Buffer
Status
● Pilot Runs
20% Decrease in
Polishing MTTF
9 Polishing Machines ● Machine
Utilization
● Overall Buffer
Status
60% Decrease in
Polishing MTTR
10 Cutting Machine ● Machine
Utilization
● Overall Buffer
Status
● Pilot Runs
25 Increase in
Cutting Buffer Size
5. PROJECT RESULTS According to the analysis in last chapter, the investments in Table 5.1 are applied on the base
model.
Table 5.1 Applied investments
After executing all the investments and free reconfigurations, the throughput of the factory
increases by 47.5% and this comparison could be found in Figure 5.1. As shown in Figure 5.2,
the utilization of all equipment in the factory are optimized as the future-state machine
utilization represents. After the improvements, the processes before painting work more
efficient and can manage the production flow even the painting process of downstream has
more demand. Removing one stamping machine has nothing harmful done for the following
work and released a lot space and consumption which fairly contributed for the capacity of the
system.
Figure 5.1 Throughput comparison between base model and improved model
Figure 5.2 Utilization comparison l
The progress of the final model is described in Table 5.2 as the comparative analysis. From this
table the output of the final model is explicitly demonstrated at different points. It is obvious
that the performance increased a lot compared to the original model. In the financial
perspective, the profit of the factory would get much improved even taking into account the
investment cost.
Table 5.2 System performance comparison
To achieve the visualization of final improved model, the related parameters are graphically
described as Figure 5.3. The displayed information gave a good view of the dynamic condition
of the system and direct data for some kind of specific analysis without going through the
reports deeply.
Figure 5.3 System visualization
Since the improvements are restricted by the limit budget, there are still other unimplemented
investments which are able to increase the throughput. The recommendations shown in Table
5.3 could be considered for the future progress.
Table 5.3 Future recommendation
In the article Comparison of Bottleneck Detection Methods for AGV Systems by Roser et al.
(2003), the most common bottleneck detection methods are described which are based on the
utilization, the waiting time and developed shifting bottleneck detection method. In the real
system, most of the time there are more than one bottleneck in the production system and some
of them could vary with time according to the dynamic system property. The primary bottleneck
has fairly highest level of influence on the system, and some less influential machines called
secondary bottlenecks will constrain the system more or less at the same time. As the analysis in
this paper shown, the waiting time method has a couple of additional limitations for bottleneck
detection which are kind of inapplicable in our project. The shifting bottleneck method
apparently has better accuracy and understand ability, but it is more difficult to implement
compared to other methods. The utilization method combined with experimental analysis is
used in this project since they are fairly enough to detect the constraint in this system and easier
to be applied. Moreover the result is verified as quite reasonable according to application of
improvements afterwards. Benefiting from the flexibility and comprehensive function of
simulation system, it is easier to get all desired information and realise different kinds of
experiments to analyze the production system behavior. It also helps to avoid potential mistakes
and unstable results which could be detected from more data and analysis. Combining the
relatively easily implemented bottleneck method and the function of the simulation system
guarantees the reliability and rationality of the result.
6. DISCUSSION
6.1. Extra Task AThis task was done to estimate the total energy consumed by the polishing machines in active
(operating) state and idle (on but not functioning) state. That was calculated after setting states
for polishing machines and then modelling the following formulas to be printed on labels posted
on the animation screen of the model:
set V_PolishingActiveEnergy = (2*(R_Polishing WorkingPolishing total * R_Polishing
WorkingPolishing average time)/3600)
set V_PolishingIdleEnergy = 1800 - (R_Polishing WarmupPolishing total * R_Polishing
WarmupPolishing average time)/3600 - (R_Polishing WorkingPolishing total * R_Polishing
WorkingPolishing average time)/3600
print "Total Energy: "(V_PolishingIdleEnergy(1) + V_PolishingActiveEnergy(1)) to
LBL_TotalPolishingEnergy(1)
From that, the total energy for all the polishing machines is 9818 kW, 3272.7 kW per machine
on average
6.2. Extra Task B
In the original system, the orders are continuously generated every time when the last order is
finished, it has the highest efficiency and continuity according to the completeness of orders. In
the extra task C, the parameter X which represents the time interval of the order arrival decides
the frequency of orders generation. The model without any improvements apparently is
incapable of finishing all orders at some conditions with different choices of X. As Figure 6.1
described, when X is equal to 70 this model can still finish 100% orders which is nearly its full
capacity. It appears that the system starting to fail to finish all orders when X reduces to 60.
This indicates, when X reaches a specific level, the system will utilize its highest ability and is
incapable of managing more orders with respect to the decrease of X.
Figure 6.2 Order completion before improvements
To be able to manage more orders, some improvements need to be implemented to accelerate
the downstream processes. Since the order generation process directly connects with painting
and assembly processed, some improvements in these processes are able to increase the ability
to take care of more orders. Considering related aspects, there are two improvements applied
here. One is adding another assembly station matching with the four existing painting lines. The
other one is reducing the painter cycle time by another 40%. The reduction ratio second
improvement is based on Figure 6.2 which simply compared the impact on the order completion
with different configurations. It is shown that when cycle time is equal to 21.2 second and X is
equal to 35, the system can manage 91.6% of the orders within 8 hours after warm-up. Along
with less X value, this system in unable to keep the 90% completion. Then the lowest X this
system can handle is 35.
Figure 6.2 Order completion with different painting cycle time and scale X
7. CONCLUSION This report shows how a production system can be simulated and optimized in terms of
productivity and line balancing using TOC as a background theory. Sim’s Coffee Cups factory
was studied and its production system was modelled. The results of the base modelled shows
that the system produce wrappers slower than other parts making all in machines along its flow
and the dedicated space recurring bottlenecks including the middle storage, painting and
molding processes. Besides, there were excess capabilities stem from having an unnecessary
additional stamping machines, while the robustness of the stamping machines was not sufficient
in terms of failure and maintenance time. Further, the overall utilization of the labour was rather
small but unevenly distributed.
Our findings proves that by building in capabilities along the wrapper flow, which could be
done by adding new painter, improving painting speed and refill capacity, adding space to
wrappers in the middle storage, and improving molding robustness. Additionally, further
improvements require investing in machines with low robustness such as polishing. In principle,
the system will reach to a point after many investments are applied in which many
improvements should be applied in the same time to improve the productivity since capabilities
become relatively balanced and single improvement will only sub optimize the system. Finally,
it is worth mentioning that free changes such as setting priorities in planning and resources to
the system constraints improve the system, which was proved in Sim’s case after operators were
given orders to prioritize the first and second bottlenecks for maintenance activities.
References
Banks, J. (2010). Discrete-event system simulation. Upper Saddle River, N.J.: Prentice Hall.
Banks, J. (2000). Getting started with AutoMod. Bountiful, UT: Brooks-PRI Automation.
Brown, S. and Maylor, H. (2005). Strategic resonant firms, mass producers, big fish & flatliners:
a study of policies. practices & performance in innovation. Technovation, 25(4), pp.307-319.
Carson, I. and John, S. (1996). AutoStat: output statistical analysis for AutoMod users. In:
Proceedings of the 28th conference on Winter simulation. IEEE Computer Society, pp. 492-499.
Goldratt, E. and Cox, J. (1992). The goal. Great Barrington, MA: North River Press.
Ingalls, R. (2008). Introduction to simulation. In: Proceedings of the 40th Conference on Winter
Simulation. Stillwater: Oklahoma State University, pp.17-26.
Rabi, M., Johansson, K. H. and Johansson, M. (2008). Optimal stopping for event-triggered
sensing and actuation. In: Proceedings of the 47th Conference on Decision and Control. Cancun,
Mexico: IEEE, pp. 3607-3612.
Robinson, S. (2004). Simulation – The practice of model development and use. Chichester, Eng.:
Wiley.
Roser, C., Nakano, M., and Tanaka, M. (2003). Comparison of bottleneck detection methods for
AGV systems. In: Proceedings of the Winter Simulation Conference 2003. LA: IEEE, pp. 1192-
1198.
Sargent, R. (2012). Verification and validation of simulation models. Journal of Simulation, 7(1),
pp.12-24.
APPENDICES
Appendix A: Possible Investments for Sim’s Production System
Appendix B: The DES Project Plan of Sim’s Coffee Cups
Appendix C: The Conceptual Model of the Production System of Sim’s Coffee Cups
Examination project Simulation of Production Systems
MPR 271 – 2014 - Version 1.6
This document describes a production system in need of improvement. The examination project
is to create a model of the production system in AutoMod, simulate and analyze its behavior, and
suggest proposals for investments able to make the production flow more efficient. Please advice
in the matrix in the course PM to see the specific objectives that you will learn and be assessed
on in this project!
Your work must be reported in five rounds:
1. Create a project plan and upload that on PingPong. The project plan should at least include base tasks scheduled in time e.g. a Gantt chart, and a project aim. A task could be to model the cutting process or plan experiments. It should include who has the main responsibility for the task or if it is shared responsibility. The project plan should align to your grade aim. If you want the highest grade, you need to plan for all extra tasks. Submit maximum two A4 pages. Upload the project plan to PingPong no later than Monday 141117.
2. Build one conceptual and one simulation model of the system as it works today (the base model). Verify the base model by demonstrating how it is running for a supervisor in the laboratory and submit the output data to PingPong. This must be done before the end of scheduled time on Friday 141205.
3. Design a plan for experimentation. Use Theory of Constrains and experimental planning. Answer the questions in the assignment on PingPong. This must be done before the end of scheduled time on 141211, but it is recommend do aim for the beginning of that week.
4. Present the final analyze for 8 minutes to the project commissioner on given times between 141215 and 141219. Upload your presentation on PingPong before your presentation time. Presentations will be scheduled later in the course and further instructions available on PingPong.
5. Deliver your final report and model according to the specification below before midnight on Monday 150112.
o Upload a report pdf file with max 6000 words. o A zipped exported automod file. o All the code in a single text file. (e.g. “model.m” or the code copied to
“allmycode.txt”)
In step 5, you should summarize and present every part of the DES-project you want credit for.
The report must be written in English and consist of maximum 6000 words. The report constitutes
the basis for examination and grading. The report should contain at least:
Output and performance of the base model
Improvement plan based on your experiment design
Output from simulation experiments and the improved final production system
A visualization of the final system must be done and at least one picture should be enclosed
A discussion relating your project to at least one of the scientific papers in the course PM.
Extra tasks to be able to achieve grade 4 or 5. For a chance of a five, you are required to at least start with all extra tasks. Two completed extra
task and one planned for but not fully implemented has a chance of five depending on the quality.
For a good, chance of grade four complete two extra tasks. However, good overall project and only
one extra task is enough for grade 4. A good performed extra task is implemented and fully
analyzed, however a planned and good described extra task that was not finished give a chance
for high grades, depending on the project as a whole.
A. The raw material plastic are produced in a factory around 200 kilometers from your factory. Sim’s Coffee Cups would like to change ordering policy from today’s fixed delivery interval to an order point strategy. In other words, an order of raw material should be placed when there are X sheets or kg plastics (do one of them) left in stock. From the time the order is placed and the order is received it takes between 3 to 9 hours, and the most likely value is 7 hours. Your task is to find a good order point (X) using simulation. Sim’s Coffee Cups expects the service level of raw material for the molding injectors to be 98%. Be aware, while improving the system you may need to change the storage size and order point. You might what to disable this order point strategy while improving the system
B. The manager heard that the polishing machines use lots of energy while they are not producing (idle or blocked). The manager wants to assess how much energy that can be saved if the machines were totally shut down when not operating and how much that strategy would affect the capacity of the plant. During operation each machine use 2 kW, during idle time they use 1 kW each. After a machine shut down, 2 minutes need to be added when the machine is started as a warm-up procedure of the).
C Model the cups to be produced to order from the middle storage. The orders arrives
continuously according to a Weibull function with shape 2 and scale X minutes. The goal
is to make your system finish at least 90 % of the orders within 8 hr after at least one-
week warmup. Decide and optimize (low is better) a safety storage level with cups ready
to be ordered in the middle storage. Apply any other needed improvement. How low X
can you get you system to handle?
The report can be written using following structure (or similar):
- Title - Abstract - Table of content - Introduction: background, purpose, objectives, problem formulation, delimitations etc. - Methodology - Project realization: work description including analysis of bottlenecks, experiment design
and analysis - Project results - Discussion (referring results and/or methodology to at least one scientific paper) - Conclusion
Implemented DES-model code must be included as an appendix – remember that code of good
quality always includes a lot of explaining comments.
Upload your report as a pdf document, all your code in a single text file. (e.g. “model.m” or the
code copied to “allmycode.txt”) and a exported and ziped arc folder to Pingpong.
Questions? Contact: [email protected] or [email protected]
Good Luck!
Sim’s Coffee Cups Keeps your coffee hot and tasty
Background You are newly hired to work at the production development department at Sim’s Coffee Cups,
which is a company producing coffee cups. Due to an exploding market in reusable and customized
coffee cups, they built a new production line for this that do not perform as expected. The poor
delivery precision of ordered cups during high demand is only one example that affects the
customers. The management team guesses that the root causes of frequent production
disruptions are to be found in poorly balanced line and old machine reused from a former
production site. The marketing department has indications of an even more increased market
demand for the company’s customized coffee cups. To be able to catch that extra demand the
capacity needs to be increased. You need to perform an investigation and deliver a report that will
serve as decision support for future investments.
Goal The goal is to improve the throughput of products in the factory as much as possible with a given
investment budget. The task is to analyze the dynamics of the product flow within the factory, find
its weaknesses and present possible investments within the frame of the fixed budget. The
investment budget for this task is 150 000 €. Improvement above 150 000 is possible but needs to
be very well motivated. However, all investments must be proven economic profitable with related
risk analysis.
Description of the production system There are three production flows. One produce the stainless steel inner coffee mug. One line
produce the plastic lids and outer plastic wrapper. One line paint the plastic mug wrapper and
assemble the cup together with the lid.
The existing and current schematic production flow is presented in Appendix A.
A list of possible investments and their costs is presented in Appendix B.
If there are any obscurities, use your engineering skills to make assumptions that are relevant to
the described production system.
Factory hours The factory is open for production 40 hours per week, and 1900 hours per year. Operating time is
07:00 to 16:00 including 1-hour lunch.
Manning Six operators and one maintenance personnel operates the production. All operators are allowed
for short breaks besides the lunch. The breaks is individual and occurs approximately according
to a Weibull distribution of shape 2 and scale 4 hours. They last approximately according to a
normal distribution with mean 5 minutes and standard deviation 0.5 minutes.
Indication of production output A production planner at Sim’s Coffee Cups has performed a very informal study of the production
output in the given production system. Her opinion is that the system can produce around 8000
cups per week. However, the production system has very seldom been tested at maximum
capacity though the demand today is approximately 4600 - 4900 cups per week.
Economics The income for the production is 4 € for each cup plus 5 € for each order
The raw materials for one individual cup cost 0,3 €
Painting costs 0.2 € for each cup
Machining cost for each machine is 25 € per hour processing (Injection molding, stamping, cutting, polishing)
When the machines is not processing they cost 5 € per hour, do only apply when the factory is open.
Each operator costs 30 € per hour
The maintenance personal cost 35 € per hour
Running cost for the facility is 10000 € month
Material handling The material handling equipment in the factory is considered very quick and robust. Therefore,
Sim’s Coffee Cups does not want you to spend time and resources on modeling a complete
movement system with forklifts and conveyors in your base model. The only conveyors to include
in the base model are given in the following description of the production system.
If you have time, you can include more conveyor and forklifts to enhance the 3D-graphics after all
important analyses are finished! Feel free to be creative if something is not described in detail.
Delivery of raw material Raw material is delivered once a day during the morning before 07:00. Stainless steel sheets comes
in pallets of 200 sheets, plastic pellets comes in pallets of 100 kg. Keep 5000 sheets and 1000 kg
plastic in your base model and optimize this in Extra task A.
Deep drawing stainless steel inner cups The first step in the line, is to stamp sheets using two parallel machines. The only required manual
operation is to fill it with stainless steel sheets and to clean it. Each cup use one sheet.
http://www.youtube.com/watch?v=qol_BGPmek8
Process: There are two identical stamping machines in the factory today.
They have each a buffer capacity of 200 sheets.
Time per part is 10 seconds.
Time for cleaning is uniformly distributed between 3 and 7 minutes (requires operator) and performed every 1000 product.
Loading the machine is done when there is less than 50 sheets left. Loading takes about 2 to 5 minutes.
The same operator serves this machine, the cutting machine, and the lid injection molding machines.
MTTF = Exponential distribution with average value of 12 hours.
MTTR = Triangular distribution: min: 12, mode: 30, max 35 minutes (requires maintenance operator).
Buffer: After the stamping process the mugs is automatically transported to a small buffer with capacity
of 5 cups, when this buffer is full the stamping machines automatically stop.
Cutting This process removes excess material from the stamping. The machine is fully automatic and
robust machine, it only needs cleaning one time each day.
Cycle time for the process is constant 10 seconds.
Cleaning requires one operator and takes between 5 and 12 minutes.
The same operator serves this machine, the deep drawing stainless, and the lid injection molding machines.
Buffer: After the cutter, the cups are automatically stored in a small buffer with capacity of 10 cups, when
this buffer is full, the cutting machines automatically stop.
Polishing Next process is polishing, the cups needs to be polished, which is done in three polishing
machines. When 9 cups are available in previous buffer and one machine is empty, loads an
operator the cups into the machine. The machine polishes the cups. When they are ready, an
operator unloads the cups onto pallets in the middle storage 100 on each pallet. The loaded
pallets are already in the middle storage and does not need to move.
http://www.youtube.com/watch?v=8LycPssTMjs
Three parallel machines, which process 9 cups each at a time.
Loading is manual process for one operator o Loading all cups takes a Weibull distribution with shape α=4 and scale β=20 sec o Unloading and inspection of all cups takes a Weibull distribution with shape α=4
and scale β=40 sec
Polishing time is constant 510 sec.
MTTF = Exponential distribution with average value of 5 hours.
MTTR = Triangular distribution: min: 50, mode: 60, max 120 minutes (requires maintenance operator).
One operator serving all three machines.
1 % of the cups are scrapped after this process.
Injection molding of lids and plastic wrapper Lids and plastic wrapper are processed in a separate line. The line have two injection molding
machines. One injection-molding machine creates lids in two parts using one die. A following
process assembles the parts using one operator. The other injection-molding machine molds the
plastic wrapper that will surround the cup. The machine produces wrappers into a box to be
transported to the middle storage.
http://www.youtube.com/watch?v=eUthHS3MTdA
Lids die o Each die strike include 4 lid assemblies. o Each lid uses 40 g plastic. 4 lid uses 40 *4 g plastic
Plastic wrapper die o Each die strike include 3 cup wrappers o Each wrapper uses 120 g plastic. 3 wrappers uses 120 * 3 g plastic.
Cycle time is constant 59 seconds
Filling the molding machines takes 5-8 minutes. Commonly this is done when it is 50 kg left in a machine.
Plastic capacity is 300 kg plastic.
The same operator serves this machine, the deep drawing stainless, and the cutting machines.
MTTF is exponential 5 hr
MTTR is normal distributed with mean 45 min and standard deviation 5 min. Repairing is done using the cutting operator.
Buffer: The lids are automatically put in a box that contain max 30 lids. If it is full the process stops
automatically
The wrappers are produced into a box of maximum 100 wrapper. When it is full the machine stops, and the Operator in the lid assembly change the box, which takes between 2 to 3 minutes.
Lid Assembly Lids have been molded in two parts that is assembled by one operator. The operator also remove
excessive material on the lids during the assembly using polishing equipment. This operator also
operates the painting machines and the middle storage.
One operator on this station
Cycle time is normally distributed with mean 18 seconds and standard deviation 3 seconds.
2 % of the lids are scrapped.
MTTF for the equipment is exponential 8 hr
MTTR is normal distributed with mean 6 min and standard deviation 30 sec, the reparation in done by the operator at the station.
Buffer: The lids are put on a pallet that contains 100 lids that is send to the middle storage when
done, which takes between 2 to 3 minutes.
Middle storage The lids and cups are stored before they are ordered in a middle storage. The middle storage has
a capacity of 2 batches stainless steel cups, 2 batches wrappers, and 2 batches lids, each batch is
100 pieces. The customer´s orders arrives to this storage and mainly rage between 1 to 500 in
size. Small orders are common and the big orders are not very common.
The order sizes are distributed as a
Size of 1:30 %, 2-5:20%, 5-20:20%, 20-400:20%, 400-500:10%
Assume a new order starts directly after one order is finished in the painting stations.
Painting Station: Each order have a unique painting that the customers can design themselves on our homepage.
For each batch, the painting machines need to be set up for the particular batch. Ones set up the
process is automatic. There are three painting lines. One operator man the printer, the middle
storage and the lid assembly.
To set up a new batch there are two phases. First, the design is loaded. Then color are
filled if it is needed.
o Load program takes uniformly 2-4 minutes and requires an operator.
o The machine has capacity for 500 cups color. If it is not enough color in the
machine, the operator fills the machine before it is started. Filling time is normally
distributed with mean 7 and standard deviation 1 minute.
The painted cups are transported on a conveyor to the assembly and packaging.
When the painter run out of plastic wrappers a new batch of 100 cups, is loaded which
takes 2-3 minutes
Each painting takes 53 sec.
MTTF and MTTR is provided as real measurements in an excel document. The document
is provided to your project groups file area on PingPong. Use the software Expert Fit to
derive a distribution from the values.
Assembly and packaging In the assembly and packaging area, lids and cups are assembled on three separate lines, one for
each painting machine. One operator operates each painting line. First the painted outside is
assembled into a metal mug and forced together. Secondly, the lid is assembled on top, perform
some last checks, and clean some dust. The operator finally package it for delivery. Each order is
packed into one package from small packages to full pallets. They are then ready for delivery.
Conveyor Conveyor speed 0.4 m/s
The conveyor is 15 meter long in total from painting stations to the end. When it is 5 meters to the assembly station, it divides into three 5 meter conveyor, one for each station
Each cup is 4.5 cm in diameter.
The conveyors are not accumulating
MTTF for conveyor: Exponentially distributed, mean 16 hours
MTTR: Weibull shape α=1.5 and scale β=90 min (requires maintenance operator)
Assembly and packaging: Cycle time for each cup is distributed as a Weibull function shape α=3 and scale β=28 sec.
Extra packaging Cycle time for each batch is distributed as a o Weibull function shape α=1.5 and scale β=120 sec for 1-10 cups orders. o Weibull function shape α=1.5 and scale β=150 sec for 10-100 cups orders. o Weibull function shape α=1.5 and scale β=250 sec for 100-500 cups orders.
Gather more lids and stainless steel cups from the middle storage takes 1-3 minutes every 100 cups and is done by the assembly operator.
Other information If you feel insecure on how to interpret the input information above, please make your own
assumptions and document them in your report. You can also ask a supervisor for guidance.
If you run on a student version of AutoMod, please make sure not to use too many entities. It
should be possible to build this model using less than 100 entities.
The YouTube videos are only there to give you a hint of the kind of process we are simulating. The
processes in the videos is not equal to the process in our project, but could help you understand
the typical environment.
Appendix A, production flow
Stamp
ing 2
(cup
s)
Stamp
ing 1
(cup
s)
Cu
tting
Polishing 1
Polishing 2
Polishing 3
Plastic M
old
ing
1
(wra
pp
er)
Lid A
ssem
bly
Pe
llets
Mid
dle Sto
rage
Plastic M
old
ing
2(lid
s)
She
ets
Appendix B, Possible investments
Conveyors €
Per meter conveyor 1000
Price for any fixture 4000
Increased speed on a conveyor (per 20%) 4000
Make one conveyor accumulating 5000
Buffers
Additional buffer capacity anywhere in the factory (25 cups or lids) 1000
Middle Storage expansion; Remove any machine on the shop floor to
get extra 1000 cups and lids space. -10000
Middle storage expansion 100 cups or lids 5000
Injection molding machines
Identical set of new molding equipment 60000
New die with any setup. (die setups: “4 wrapper”, “3 wrappers
assemblies and 1 lid assemblies”, “2 wrappers assemblies and 2
Assemblies”, or “1 wrapper and 3 assemblies”, or “5 lids assemblies”) 20000
Automatic pellets filler continuously from central storage 30000
Increased MTTF (per 20%, max 60 %) 10000
Decreased MTTR (per 20%, max 60 %) 13000
Stainless steel drawing
Identical set of new molding equipment 30000
Increased loading buffer x2 10000
Increased MTTF (per 20%, max 60 %) 10000
Decreased MTTR (per 20%, max 60 %) 13000
Stainless steel Cutting
Add functions to polishing machines eliminate this process 30000
Increased MTTF (per 20%, max 60 %) 8000
Decreased MTTR (per 20%, max 60 %) 10000
Polishing
Identical set of new equipment 40000
Reduced cycle time (per 10%, max 40%) 15000
Fully automatic process, a conveyor has to connect the other
processes. 10 % longer cycle time, no loading time. 45000
Increased MTTF (per 20%, max 60 %) 10000
Decreased MTTR (per 20%, max 60 %) 6000
Assembly lids
New Line 5000
Reduce all cycle times (per 10%, max 30 %) 10000
Automatic machines, connect with conveyor 40000
Increased MTTF (per 20%, max 40%) 8000
Decreased MTTR (per 20%, max 20%) 3000
Painting
New station, including conveyor 40000
Reduce all cycle times (per 10%, max 20%) 14000
Bigger refill capacity 400 % increase, per printer 5000
Load two batches at a time, takes 3-4 minutes 15000
Increased MTTF (per 20%, max 40%) 13000
Decreased MTTR (per 20%, max 40%) 15000
Assembly
Assembly station 20000
Auto packaging machine, order cycle time decrease 40 % 10000
Project for standardized work, reduce scrap by 50 % 30000
Manning
New employee (Initial cost except salary) 5000
Train anyone to do one additional task 8000
If you find out other improvements than the ones mentioned above, please make realistic
assumptions and use much as needed.
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Model
(without extra tasks)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The code for extra tasks follows at the
end of this code independently
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
begin model initialization function
//Molding
set Q_Molding_wait(1) capacity to 300000/160 //buffer size in grams
set Q_Molding_wait(2) capacity to 300000/360 //buffer size in grams
set Q_Molding(1) capacity to 1
set Q_Molding(2) capacity to 1
//Box size for wrappers and lids
set Q_Wrapper_Box capacity to 125
set Q_Lid_Box capacity to 30
//Lid Assembly
set Q_LidAssembly capacity to 1
//Middle Storage
set Q_LidMS_Wait capacity to 1200
set Q_WrapperMS_Wait capacity to 1200
set Q_CupMS_Wait capacity to 1200
//Stamping
set Q_Stamping_wait capacity to 200
set Q_Stamping capacity to 1
//Cutting
set Q_Cutting_wait capacity to 30
set Q_Cutting capacity to 1
//Polishing
set Q_Polishing_wait capacity to 1
set Q_BatchP capacity to 9
set Q_Polishing(1) capacity to 1
set Q_Polishing(2) capacity to 1
set Q_Polishing(3) capacity to 1
//Painting
set Q_Painting(1) capacity to 1
set Q_Painting(2) capacity to 1
set Q_Painting(3) capacity to 1
set Q_Painting(4) capacity to 1
//Assembly
set Q_Assembly(1) capacity to 1
set Q_Assembly(2) capacity to 1
set Q_Assembly(3) capacity to 1
//Plastic Ordering
create 1 load of load type L_Plastic to P_InitialMolding
create 1 load of load type L_LoadingPlastic to P_LoadingPlastic(1)
create 1 load of load type L_LoadingPlastic to P_LoadingPlastic(2)
//Sheet Ordering
set Q_SheetStorage capacity to 5000
create 1 load of load type L_Sheet to P_InitialStamping
//Order Generation
create 1 load of load type L_order to P_Order(1)
create 1 load of load type L_order to P_Order(2)
create 1 load of load type L_order to P_Order(3)
create 1 load of load type L_order to P_Order(4)
//Maintenance
create 1 loads of load type L_clean to P_Cutter_cleaning
create 1 loads of load type L_Breakdown_Cups to P_DownTime_Stamping1
create 1 loads of load type L_Breakdown_Cups to P_DownTime_Stamping2
create 1 loads of load type L_Breakdown_Cups to P_DownTime_Polishing1
create 1 loads of load type L_Breakdown_Cups to P_DownTime_Polishing2
create 1 loads of load type L_Breakdown_Cups to P_DownTime_Polishing3
create 1 load of load type L_breakdown_LidMolding to P_DownTime_LidMolding
create 1 load of load type L_Breakdown_WrapperMolding to P_DownTime_WrapperMolding
create 1 load of load type L_breakdown_LidAssembly to P_DownTime_LidAssembly
create 1 load of load type L_breakdown_Painting1 to P_DownTime_Painting1
create 1 load of load type L_breakdown_Painting2 to P_DownTime_Painting2
create 1 load of load type L_breakdown_Painting3 to P_DownTime_Painting3
create 1 load of load type L_breakdown_Painting3 to P_DownTime_Painting4
create 1 load of load type L_breakdown_Conveyor to P_DownTime_Conveyor
create 1 load of load type L_ShortBreak to P_Operator1ShortBreak
create 1 load of load type L_ShortBreak to P_Operator2ShortBreak
create 1 load of load type L_ShortBreak to P_Operator3ShortBreak
create 1 load of load type L_ShortBreak to P_Assembler1ShortBreak
create 1 load of load type L_ShortBreak to P_Assembler2ShortBreak
create 1 load of load type L_ShortBreak to P_Assembler3ShortBreak
create 1 load of load type L_Print to P_Print
return 0
end
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
// System Visualization
begin P_Print arriving procedure
while 1 = 1
begin
//Labor Utilization
print "Util Maintenance (%): " (100*(R_Maintenance relative average)) to UtilMaint
print "Util Operator 1 (%): " (100*(R_Operator1 relative average)) to UtilOp1
print "Util Operator 2 (%): " (100*(R_Operator2 relative average)) to UtilOp2
print "Util Operator 3 (%): " (100*(R_Operator3 relative average)) to UtilOp3
print "Util Station 1 (%): " (100*(R_Assembly(1) relative average)) to UtilSta1
print "Util Station 2 (%): " (100*(R_Assembly(2) relative average)) to UtilSta2
print "Util Station 3 (%): " (100*(R_Assembly(3) relative average)) to UtilSta3
//Machine Utilization
print "Util Stamping 1 (%): " (100*(R_Stamping WorkingStamping total* R_Stamping
WorkingStamping average time/ac)) to UtilStam1
print "Util Cutting (%): " (100*(R_Cutting WorkingCutting total * R_Cutting
WorkingCutting average time/ac)) to UtilCut
print "Util Polishing 1 (%): " (100*(R_Polishing(1) WorkingPolishing total *
R_Polishing(1) WorkingPolishing average time/ac)) to UtilPol ish1
print "Util Polishing 2 (%): " (100*(R_Polishing(2) WorkingPolishing total *
R_Polishing(2) WorkingPolishing average time/ac)) to UtilPolish2
print "Util Polishing 3 (%): " (100*(R_Polishing(3) WorkingPolishing total *
R_Polishing(3) WorkingPolishing average time/ac)) to UtilPolish3
print "Util Lid Molding (%): " (100*(R_Molding(1) WorkingMolding total *
R_Molding(1) WorkingMolding average time/ac)) to UtilMold1
print "Util Wrapper Molding (%): " (100*(R_Molding(2) WorkingMolding total *
R_Molding(2) WorkingMolding average time/ac)) to UtilMold2
print "Util Lid Assembly (%): " (100*(R_LidAssembly WorkingLidPolishing total *
R_LidAssembly WorkingLidPolishing average time/ac)) to UtilLidAs
print "Util Painting 1 (%): " (100*(R_Painting(1) WorkingPainting total * R_Painting(1)
WorkingPainting average time/ac)) to UtilPaint1
print "Util Painting 2 (%): " (100*(R_Painting(2) WorkingPainting total * R_Painting(2)
WorkingPainting average time/ac)) to UtilPaint2
print "Util Painting 3 (%): " (100*(R_Painting(3) WorkingPainting total * R_Painting(3)
WorkingPainting average time/ac)) to UtilPaint3
print "Util Painting 4 (%): " (100*(R_Painting(4) WorkingPainting total * R_Painting(4)
WorkingPainting average time/ac)) to UtilPaint4
//Machine Downtime
print "Down time Stamping 1 (%): " (100*(R_Stamping average down)) to DownStam1
print "Down time Cutting (%): " (100*(R_Cutting average down)) to DownCut
print "Down time Polishing 1 (%): " (100*(R_Polishing(1) average down)) to
DownPolish1
print "Down time Polishing 2 (%): " (100*(R_Polishing(2) average down)) to
DownPolish2
print "Down time Polishing 3 (%): " (100*(R_Polishing(3) average down)) to
DownPolish3
print "Down time Lid Molding (%): " (100*(R_Molding(1) average down)) to
DownMold1
print "Down time Wrapper Molding (%): " (100*(R_Molding(2) average down)) to
DownMold2
print "Down time Lid Assembly (%): " (100*(R_LidAssembly average down)) to
DownLidAs
print "Down time Painting 1 (%): " (100*(R_Painting(1) average down)) to DownPaint1
print "Down time Painting 2 (%): " (100*(R_Painting(2) average down)) to DownPaint2
print "Down time Painting 3 (%): " (100*(R_Painting(3) average down)) to DownPaint3
print "Down time Painting 4 (%): " (100*(R_Painting(4) average down)) to DownPaint4
/*%%%%%%%%%%%%%%%%%% Economic calculations and display
%%%%%%%%%%%%%%%%*/
//The idel cost of machines
set V_IdelCost = 1900*7 - ((R_Stamping WorkingStamping total* R_Stamping
WorkingStamping average time)/3600+
(R_Cutting WorkingCutting total * R_Cutting
WorkingCutting average time)/3600+
(R_Polishing(1) WorkingPolishing total *
R_Polishing(1) WorkingPolishing average time)/3600+
(R_Polishing(2) WorkingPolishing total *
R_Polishing(2) WorkingPolishing average time)/3600+
(R_Polishing(3) WorkingPolishing total *
R_Polishing(3) WorkingPolishing average time)/3600+
(R_Molding(1) WorkingMolding total *
R_Molding(1) WorkingMolding average time)/3600+
(R_Molding(2) WorkingMolding total *
R_Molding(2) WorkingMolding average time)/3600)
//The total cost of machines
set V_TotalCost = (0.5*(Q_CoffeeCup total))+
(25*((R_Stamping WorkingStamping total* R_Stamping WorkingStamping
average time)/3600+
(R_Cutting WorkingCutting total * R_Cutting WorkingCutting
average time)/3600+
(R_Polishing(1) WorkingPolishing total * R_Polishing(1)
WorkingPolishing average time)/3600+
(R_Polishing(2) WorkingPolishing total * R_Polishing(2)
WorkingPolishing average time)/3600+
(R_Polishing(3) WorkingPolishing total * R_Polishing(3)
WorkingPolishing average time)/3600+
(R_Molding(1) WorkingMolding total * R_Molding(1)
WorkingMolding average time)/3600+
(R_Molding(2) WorkingMolding total * R_Molding(2)
WorkingMolding average time)/3600))+
V_IdelCost + (1900*((6*30)+35))+(10000*12)
print "Total Cost (€): "V_TotalCost to LBL_TotalCost
print "Total Income (€): "(4*(Q_CoffeeCup total))+(V_NumOfOrders*5) to
LBL_TotalIncome
print "Inflow Year 1 (€):"(4*(Q_CoffeeCup total))+(V_NumOfOrders*5) - V_TotalCost
to Inflow
//The calculation of WIP
set V_Capital = ((Q_LidMS_Wait current + Q_WrapperMS_Wait current +
Q_Painting(1) current + Q_Painting(2) current +
Q_Painting(3) current + Q_Painting(4) current)* 0.3) + ((Q_Assembly(1)
current + Q_Assembly(2) current +
Q_Assembly(3) current)* 0.5)
print "Current WIP (€): " V_Capital " €" to WIPCapital
wait for 2 min
end
end
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Cup Making Processes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*Stamping Initialization*/
begin P_InitialStamping arriving procedure
while 1 = 1 do begin
set V_DeliverySheet = Q_SheetStorage remaining space // Keep 5000 sheets in the
model
create V_DeliverySheet loads of load type L_Sheet to P_Stamping_Filling
wait for 8 hr //Delivering at the begining of each work day
end
end
begin P_Stamping_Filling arriving procedure
move into Q_SheetStorage
create 1 load of load type L_Sheet to P_LoadingSheet
wait to be ordered on OL_Sheets
end
begin P_LoadingSheet arriving procedure
set priority to 1 //Priority setting for related processed
set V_Sheetnumber = Q_Stamping_wait remaining space //Every filling is the volume of the
remaning space in stamping buffer
order V_Sheetnumber loads from OL_Sheets to P_NewStamping
if V_loading = 150 then
begin
use R_Operator1 for uniform 3.5, 1.5 min //Loading Stamping machine when there is
50 sheets left
set V_loading = 0
end
end
/*Stamping*/
begin P_NewStamping arriving procedure
set priority to 1
move into Q_Stamping_wait
move into Q_Stamping
get R_Stamping
set R_Stamping state to WorkingStamping
wait for 10 sec //Processing time per part
free R_Stamping
inc V_Stamp1 by 1
if V_Stamp1 = 1000 then //Cleaning is executed every 1000 products
begin
take down R_Stamping
set R_Stamping state to InCleaningStamping
get R_Operator1
wait for uniform 5, 2 min // Cleaning Stamping Machine
bring up R_Stamping
free R_Operator1
set V_Stamp1 = 0
end
send to P_Cutting
end
/*Cutting*/
begin P_Cutting arriving procedure
set priority to 0
move into Q_Cutting_wait
move into Q_Cutting
get R_Cutting
set R_Cutting state to WorkingCutting
wait for 10 sec //Cycle time for cutting
free R_Cutting
// Batching 9 cups to polishing
move into Q_Polishing_wait
move into Q_BatchP
if OL_PolishBatch current < 8
begin
wait to be ordered on OL_PolishBatch
move into Q_BatchWait
wait to be ordered on OL_PolishBatchWait
end
//If there is no space in polshing buffer, cutting process will stop
if Q_Polishing(1) remaining space = 0 and Q_Polishing(2) remaining space = 0 and
Q_Polishing(3) remaining space = 0 then
wait to be ordered on OL_Polishing
order 8 loads from OL_PolishBatch to continue
//Send to polishing process
choose a queue from among Q_Polishing(1), Q_Polishing(2), Q_Polishing(3) // Choose a
Polishing machine
whose current loads is minimum
save choice as A_qpolishing
set A_polishingindex = A_qpolishing index
send to P_Polishing(A_polishingindex)
end
/*Polishing*/
begin P_Polishing arriving procedure
move into Q_Polishing(procindex)
use R_Operator3 for w 4, 20 sec // Loading cups by the operator
get R_Polishing(procindex)
set R_Polishing(procindex) state to WorkingPolishing
wait for 510 sec //Cycle time for polishing
free R_Polishing(procindex)
use R_Operator3 for w 4, 40 sec // Unloading and inspecting cups
wait until Q_CupMS_Wait remaining space > 9 // 9 cups are polished each time
order 8 loads from OL_PolishBatchWait to P_CupMiddleStorage
move into Q_AfterP
order 1 loads from OL_Polishing to P_CupMiddleStorage
send to P_CupMiddleStorage
end
/*Steel Cup Middle Storage*/
begin P_CupMiddleStorage arriving procedure
set V_PolishScrap to oneof(99:1,1:0) //1% of the cups from polishing are scrapped
if V_PolishScrap = 0 then
begin
move into Q_Scrap
print "Scraped: " Q_Scrap total " products" to Scrap
end
move into Q_CupMS_Wait
order 1 load from OL_WaitingforCups to continue
wait to be ordered on OL_CuptoAssembly // wait to be ordered by assembly process
end
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Lids and Wrappers Making
Processes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*Molding Initialization */
begin P_InitialMolding arriving procedure
while 1 = 1 do begin
set V_DeliveryPlastic(1) = 300000/160 //Every delivery is the volume of the remaining
space in Lid Molding Buffer
set V_DeliveryPlastic(2) = 300000/360 //Every delivery is the volume of the remaining
space in Wrapper Molding Buffer
order 1 load from OL_Waitformaterial to continue
wait for 8 hr
end
end
begin P_LoadingPlastic arriving procedure
while 1=1 do begin
wait for uniform 6.5, 1.5 min //Filling the molding machine
set A_Moldnumber(procindex) = Q_Molding_wait(procindex) remaining space
create A_Moldnumber(procindex) loads of load type L_Molding(procindex) to
P_Molding(procindex)
wait to be ordered on OL_Waitforload(procindex)
end
end
/*Molding*/
begin P_Molding arriving procedure
set priority to 2
set A_Moldingindex = procindex
move into Q_Molding_wait(procindex)
move into Q_Molding(procindex)
//Filling the molding machine
if procindex = 1 then
if Q_Molding_wait(1) remaining space > 1563 then // check if there is less than 50kg plastic in
the machine
order 1 load from OL_Waitforload(1) to continue
if procindex = 2 then
if Q_Molding_wait(2) remaining space > 694 then // check if there is less than 50kg
plastic in the machine
order 1 load from OL_Waitforload(2) to continue
//Check if the box is full
if A_Moldingindex = 1 then
begin
if Q_Lid_Box remaining space = 0 then
wait to be ordered on OL_LidtoBoxFull //wait until there is space in the box
create 4 loads of load type L_Lid to P_LidBoxing // Put 4 Lids in the box
end
else
begin
if Q_Wrapper_Box remaining space = 0 then
wait to be ordered on OL_WrappertoBoxFull //wait until there is space in the box
create 3 loads of load type L_Wrapper to P_WrapperBoxing // Put 3 Wrappers in the
box
end
//Molding
get R_Molding(procindex)
set R_Molding(procindex)state to WorkingMolding
wait for 59 sec
free R_Molding(procindex)
send to die
end
/*Lid Box*/
begin P_LidBoxing arriving procedure
move into Q_Lid_Box
send to P_LidAssembly
end
/*Wrapper Box*/
begin P_WrapperBoxing arriving procedure
move into Q_Wrapper_Box
send to P_WrapperMiddleStorage
end
/*Lid Assembly*/
begin P_LidAssembly arriving procedure
set priority to 0
move into Q_LidAssembly
//One box of lids from molding process
if Q_Lid_Box remaining space = 4 then
order 1 load from OL_LidtoBoxFull to continue
//Assembling lid
get R_LidAssembly
set R_LidAssembly state to WorkingLidPolishing
wait for normal 18, 3 sec
free R_LidAssembly
//2% of the cups from polishing are scrapped
set V_LidScrap to oneof(98:1,2:0)
if V_LidScrap = 0 then
begin
move into Q_Scrap
print "Scraped: " Q_Scrap total " products" to Scrap
end
// Move to the middle storage every 100 lid assemblies on a pallet
inc V_LidtoMS by 1
if V_LidtoMS = 100 then
begin
use R_Operator2 for uniform 2.5, 0.5 min // Takes 2-3 mins to Middle Storage
set V_LidtoMS = 0
end
send to P_LidMiddleStorage
end
/*Lid Middle Storage*/
begin P_LidMiddleStorage arriving procedure
move into Q_LidMS_Wait
order 1 load from OL_WaitingforLids to continue
wait to be ordered on OL_LidtoAssembly // wait to be ordered by assembly process
send to die
end
/*Wrapper Middle Storage*/
begin P_WrapperMiddleStorage arriving procedure
move into Q_WrapperMS_Wait
if Q_Wrapper_Box remaining space = 3 then
order 1 load from OL_WrappertoBoxFull to continue //One box of wrappers from
molding process
wait to be ordered on OL_WrappertoPainting // wait to be ordered by painting process
end
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Painting and Assembly
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*Order Generation*/
begin P_Order arriving procedure
while 1 = 1 do begin
wait until V_PaintingNum(procindex) = V_OrderSize(procindex)
begin
//Order size distribution
set V_OrderSize1 to uniform 4,2
set V_OrderSize2 to uniform 13,8
set V_OrderSize3 to uniform 190.5,170.5
set V_OrderSize4 to uniform 450.5,50.5
set V_OrderSize(procindex) to oneof(30:1, 20:V_OrderSize1,
20:V_OrderSize2, 20:V_OrderSize3, 10:V_OrderSize4)
//Set the related variables in downstream processes
set V_PaintingNum(procindex) to 0
set V_AssemblyNum(procindex) to V_OrderSize(procindex)
order V_OrderSize(procindex) loads from OL_WrappertoPainting to
P_Painting(procindex)
in case order not filled backorder on OL_WrappertoPainting
inc V_NumOfOrders by 1 // Counting order numbers
use R_Operator2 for uniform 3, 1 min // Loading program for Painting
machine
end
end
end
/*Painting*/
begin P_Painting arriving procedure
set priority to 1
move into Q_Painting(procindex)
// Filling colors for Painting Machine
inc V_Paint(procindex) by 1
if V_Paint(procindex) = 2000 then
begin
use R_Operator2 for normal 7, 1 min // Filling color
set V_Paint(procindex) = 0
end
// Check if wrappers run out
inc V_Runout(procindex) by 1
if V_Runout(procindex) = 200 then
begin
use R_Operator2 for uniform 3.5, 0.5 min //Fetching the Wrapper Boxes takes
2-3 minutes
set V_Runout(procindex) = 0
end
//Cycle time of Painting
get R_Painting(procindex)
set R_Painting(procindex) state to WorkingPainting
wait for 42.4 sec
free R_Painting(procindex)
inc V_PaintingNum(procindex) by 1 // Counting the finished painting numbers which is used
to compare with order size
send to P_AssemblyLoading(procindex)
end
/*Conveyor*/
begin P_AssemblyLoading arriving procedure
move into Assembly.ConvLoading
if procindex = 1 then
begin
travel to Assembly.AssemblySt1
send to P_Assembly(1)
end
else if procindex = 2 then
begin
travel to Assembly.AssemblySt2
send to P_Assembly(2)
end
else if procindex = 3 then
begin
travel to Assembly.AssemblySt3
send to P_Assembly(3)
end
else
begin
travel to Assembly.AssemblySt1 // The products from painter 4 go to
assembly station 1
send to P_Assembly(1)
end
end
/*Final Assembly*/
begin P_Assembly arriving procedure
move into Q_Assembly(procindex)
//Check Lids and Cups which are waiting in the middle storage
if OL_LidtoAssembly current = 0 then
wait to be ordered on OL_WaitingforLids
order 1 load from OL_LidtoAssembly to continue
if OL_CuptoAssembly current = 0 then
wait to be ordered on OL_WaitingforCups
order 1 load from OL_CuptoAssembly to die
//Assembly Coffee Cup
use R_Assembly(procindex) for weibull 3, 28 sec
//Extra Packaging Time
if V_AssemblyNum(procindex) > 100 then
begin
use R_Assembly(procindex) for weibull 1.5, 250 sec
set V_AssemblyNum(procindex) = 0
end
else if V_AssemblyNum(procindex) > 10 then
begin
use R_Assembly(procindex) for weibull 1.5, 150 sec
set V_AssemblyNum(procindex) = 0
end
else if V_AssemblyNum(procindex) > 0 then
begin
use R_Assembly(procindex) for weibull 1.5, 120 sec
set V_AssemblyNum(procindex) = 0
end
// Taking lids from middle storage when it runs out
inc V_Assembly(procindex) by 1
if V_Assembly(procindex) = 100 then
begin
set V_Assembly(procindex) = 0
use R_Assembly(procindex) for uniform 2, 1 min
end
// Printing the good coffee cups and average speed
print "Ok Products: " Q_CoffeeCup total " products" to FinishedProducts
set V_Speed = Q_CoffeeCup total /(ac/3600)
print "Average Speed: " V_Speed " products per hr" to Speed
move into Q_CoffeeCup
end
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Maintenance
Processes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
//Stamping Maintenance
begin P_DownTime_Stamping1 arriving procedure
set priority to 1
while 1=1 do begin
wait for e 12 hr /* MTTF */
take down R_Stamping
set R_Stamping state to InFailureStamping
get R_Maintenance
wait for triangular 12, 30, 35 min /* MTTR */
bring up R_Stamping
free R_Maintenance
end
end
// Cleaning of Cutting machine
begin P_Cutter_cleaning arriving procedure
while 1=1 do begin
wait for 8 hr
take down R_Cutting
set R_Cutting state to InCleaningCutting
get R_Operator1
wait for uniform 8.5, 3.5 min /* Cleaning Cutting Machine */
bring up R_Cutting
free R_Operator1
end
end
// Polishing Maintenance
begin P_DownTime_Polishing1 arriving procedure
set priority to 2
while 1=1 do begin
wait for e 6 hr /* MTTF */
take down R_Polishing(1)
set R_Polishing(1) state to InFailurePolishing
get R_Maintenance
wait for triangular 20, 24, 48 min /* MTTR */
bring up R_Polishing(1)
free R_Maintenance
end
end
begin P_DownTime_Polishing2 arriving procedure
set priority to 2
while 1=1 do begin
wait for e 6 hr /* MTTF */
take down R_Polishing(2)
set R_Polishing(2) state to InFailurePolishing
get R_Maintenance
wait for triangular 20, 24, 48 min /* MTTR */
bring up R_Polishing(2)
free R_Maintenance
end
end
begin P_DownTime_Polishing3 arriving procedure
set priority to 2
while 1=1 do begin
wait for e 6 hr /* MTTF */
take down R_Polishing(3)
set R_Polishing(3) state to InFailurePolishing
get R_Maintenance
wait for triangular 20, 24, 48 min /* MTTR */
bring up R_Polishing(3)
free R_Maintenance
end
end
// Molding Maintenance
begin P_DownTime_LidMolding arriving procedure
while 1=1 do begin
wait for e 5 hr /* MTTF */
take down R_Molding(1)
set R_Molding(1)state to InFailureMolding
get R_Operator1
wait for normal 18, 2 min /* MTTR */
bring up R_Molding(1)
free R_Operator1
end
end
begin P_DownTime_WrapperMolding arriving procedure
while 1=1 do begin
wait for e 5 hr /* MTTF */
take down R_Molding(2)
set R_Molding(2)state to InFailureMolding
get R_Operator1
wait for normal 27, 3 min /* MTTR */
bring up R_Molding(2)
free R_Operator1
end
end
//Lid assembling Maintenance
begin P_DownTime_LidAssembly arriving procedure
while 1=1 do begin
wait for e 8 hr /* MTTF */
take down R_LidAssembly
set R_LidAssembly state to InFailureLidPolishing
get R_Operator2
wait for normal 27, 3 min /* MTTR */
bring up R_LidAssembly
free R_Operator2
end
end
// Painting Maintenance
begin P_DownTime_Painting1 arriving procedure
while 1=1 do begin
wait for weibull 1.011, 14.4 hr /* MTTF */
/*wait for e 15 hr*/
take down R_Painting(1)
set R_Painting(1) state to InFailurePainting
get R_Maintenance
wait for normal 9, 1 min
bring up R_Painting(1)
free R_Maintenance
end
end
begin P_DownTime_Painting2 arriving procedure
while 1=1 do begin
wait for weibull 1.011, 14.4 hr /* MTTF */
take down R_Painting(2)
set R_Painting(2) state to InFailurePainting
get R_Maintenance
wait for normal 9, 1 min
bring up R_Painting(2)
free R_Maintenance
end
end
begin P_DownTime_Painting3 arriving procedure
while 1=1 do begin
wait for weibull 1.011, 14.4 hr /* MTTF */
take down R_Painting(3)
set R_Painting(3) state to InFailurePainting
get R_Maintenance
wait for normal 9, 1 min
bring up R_Painting(3)
free R_Maintenance
end
end
begin P_DownTime_Painting4 arriving procedure
while 1=1 do begin
wait for weibull 1.011, 14.4 hr /* MTTF */
take down R_Painting(4)
set R_Painting(4) state to InFailurePainting
get R_Maintenance
wait for normal 9, 1 min
bring up R_Painting(4)
free R_Maintenance
end
end
// Conveyor Maintenance
begin P_DownTime_Conveyor arriving procedure
while 1=1 do begin
wait for e 16 hr /* MTTF */
take down Assembly.M_sec1 /* Decelerate to a stop */
wait for weibull 1.5, 90 min /* MTTR */
bring up Assembly.M_sec1 /* Return to previous velocity */
end
end
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Short Breaks by Operators
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
begin P_Operator1ShortBreak arriving procedure
while 1=1 do begin
wait for weibull 2, 4 hr /* Breaks occuring interval */
get R_Operator1
wait for normal 5, 0.5 min /* Break time */
free R_Operator1
end
end
begin P_Operator2ShortBreak arriving procedure
while 1=1 do begin
wait for weibull 2, 4 hr /* Breaks occuring interval */
get R_Operator2
wait for normal 5, 0.5 min /* Break time */
free R_Operator2
end
end
begin P_Operator3ShortBreak arriving procedure
while 1=1 do begin
wait for weibull 2, 4 hr /* Breaks occuring interval */
get R_Operator3
wait for normal 5, 0.5 min /* Break time */
free R_Operator3
end
end
begin P_Assembler1ShortBreak arriving procedure
while 1=1 do begin
wait for weibull 2, 4 hr /* Breaks occuring interval */
get R_Assembly(1)
wait for normal 5, 0.5 min /* Break time */
free R_Assembly(1)
end
end
begin P_Assembler2ShortBreak arriving procedure
while 1=1 do begin
wait for weibull 2, 4 hr /* Breaks occuring interval */
get R_Assembly(2)
wait for normal 5, 0.5 min /* Break time */
free R_Assembly(2)
end
end
begin P_Assembler3ShortBreak arriving procedure
while 1=1 do begin
wait for weibull 2, 4 hr /* Breaks occuring interval */
get R_Assembly(3)
wait for normal 5, 0.5 min /* Break time */
free R_Assembly(3)
end
end
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of
the basic tasks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Extra Taks
A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/* Change in StampingInitialization*/
begin P_InitialStamping arriving procedure
while 1 = 1 do begin
create V_OrderPoint_Sheet loads of load type L_Sheet to P_Stamping_Filling
wait to be ordered on OL_SheetStock
wait for t 3, 7, 9 hr
end
end
begin P_Stamping_Filling arriving procedure
move into Q_SheetStorage
create 1 load of load type L_Sheet to P_LoadingSheet
wait to be ordered on OL_Sheets
end
begin P_CheckSheet arriving procedure
while 1 = 1 do begin
if Q_SheetStorage remaining space =< V_OrderPoint_Sheet then
order 1 load from OL_SheetStock to continue
end
end
/* Change in Molding Initialization*/
begin P_InitialMolding arriving procedure
while 1 = 1 do begin
wait to be ordered on OL_PlasticStock
wait for t 3, 7, 9 hr
clone V_OrderPoint loads to P_PlasticStock
end
end
begin P_PlasticStock arriving procedure
move into Q_Plastic
wait to be ordered on OL_LoadingPlastic
if V_OrderPoint =< Q_Plastic remaining space then
order 1 load from OL_PlasticStock to continue
send to die
end
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of
Taks A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Extra Taks
B %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
//Change in begin P_Print process
set V_PolishingIdleEnergy(1) = 1800 -(R_Polishing(1) WarmupPolishing total * R_Polishing(1)
WarmupPolishing average time)/3600 -
(R_Polishing(1) WorkingPolishing total *
R_Polishing(1) WorkingPolishing average time)/3600
set V_PolishingIdleEnergy(2) = 1800 -(R_Polishing(2) WarmupPolishing total * R_Polishing(2)
WarmupPolishing average time)/3600 -
(R_Polishing(2) WorkingPolishing total *
R_Polishing(2) WorkingPolishing average time)/3600
set V_PolishingIdleEnergy(3) = 1800 -(R_Polishing(3) WarmupPolishing total * R_Polishing(3)
WarmupPolishing average time)/3600 -
(R_Polishing(3) WorkingPolishing total *
R_Polishing(3) WorkingPolishing average time)/3600
set V_PolishingActiveEnergy(1) = (2*(R_Polishing(1) WorkingPolishing total * R_Polishing(1)
WorkingPolishing average time)/3600)
set V_PolishingActiveEnergy(2) = (2*(R_Polishing(2) WorkingPolishing total * R_Polishing(2)
WorkingPolishing average time)/3600)
set V_PolishingActiveEnergy(3) = (2*(R_Polishing(3) WorkingPolishing total * R_Polishing(3)
WorkingPolishing average time)/3600)
print "Idle Energy: "V_PolishingIdleEnergy(1) to LBL_IdlePoli shingEnergy(1)
print "Idle Energy: "V_PolishingIdleEnergy(2) to LBL_IdlePolishingEnergy(2)
print "Idle Energy: "V_PolishingIdleEnergy(3) to LBL_IdlePolishingEnergy(3)
print "Active Energy: "V_PolishingActiveEnergy(1) to LBL_ActivePolishingEnergy(1)
print "Active Energy: "V_PolishingActiveEnergy(2) to LBL_ActivePolishingEnergy(2)
print "Active Energy: "V_PolishingActiveEnergy(3) to LBL_ActivePolishingEnergy(3)
print "Total Energy: "(V_PolishingIdleEnergy(1) + V_PolishingActiveEnergy(1)) to
LBL_TotalPolishingEnergy(1)
print "Total Energy: "(V_PolishingIdleEnergy(2) + V_PolishingActiveEnergy(2)) to
LBL_TotalPolishingEnergy(2)
print "Total Energy: "(V_PolishingIdleEnergy(3)+ V_PolishingActiveEnergy(3)) to
LBL_TotalPolishingEnergy(3)
set V_Total Energy = V_PolishingIdleEnergy(1) +
V_PolishingActiveEnergy(1)+V_PolishingIdleEnergy(2) + V_PolishingActiveEnergy(2)+
V_PolishingIdleEnergy(3)+ V_PolishingActiveEnergy(3)
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of
Task B %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Extra Taks
C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*Change of middle storage size */
set Q_LidMS_Wait capacity to V_M
set Q_WrapperMS_Wait capacity to V_M
set Q_CupMS_Wait capacity to V_M
/*Change of Order Generation*/
begin P_OrderArrival arriving procedure
while 1=1 do begin
create 1 load of load type L_order_arrive to
nextof(P_Order(1),P_Order(2),P_Order(3),P_Order(4))
inc C_TotalOrders by 1 // Number of total orders
wait for weibull 2, V_X min /* order arriving interval */
end
end
begin P_Order arriving procedure
wait until V_PaintingNum(procindex) = V_OrderSize(procindex)
set V_OrderSize1 to uniform 4,2
set V_OrderSize2 to uniform 13,8
set V_OrderSize3 to uniform 190.5,170.5
set V_OrderSize4 to uniform 450.5,50.5
set V_OrderSize(procindex) to oneof(30:1, 20:V_OrderSize1, 20:V_OrderSize2,
20:V_OrderSize3, 10:V_OrderSize4)
set V_PaintingNum(procindex) to 0
order V_OrderSize(procindex) loads from OL_WrappertoPainting to P_Painting(procindex)
in case order not filled backorder on OL_WrappertoPainting
wait until V_Finished(procindex) = 0 // Set the variables in assembly process when the it
finished the order size, V_Finished(procindex) is checked in assembly process
set V_AssemblyOld(procindex) to V_OrderSize(procindex)
set V_AssemblyNum(procindex) to V_OrderSize(procindex)
use R_Operator2 for uniform 3, 1 min // Loading program for Painting machine
end
/*Change of Painting*/
begin P_Painting arriving procedure
set priority to 1
move into Q_Painting(procindex)
// Filling colors for Painting Machine
inc V_Paint(procindex) by 1
if V_Paint(procindex) = 2000 then
begin
use R_Operator2 for normal 7, 1 min // Filling color
set V_Paint(procindex) = 0
end
// Check if wrappers run out
inc V_Runout(procindex) by 1
if V_Runout(procindex) = 200 then
begin
use R_Operator2 for uniform 3.5, 0.5 min //Assumption for moving the
Wrapper Boxes takes 2-3 minutes
set V_Runout(procindex) = 0
end
//Painting
get R_Painting(procindex)
set R_Painting(procindex) state to WorkingPainting
wait for V_PaintingCycleTime sec // Change cycle time of painting to a variable
free R_Painting(procindex)
inc V_PaintingNum(procindex) by 1
send to P_AssemblyLoading(procindex)
end
/*Change of Conveyor*/
begin P_AssemblyLoading arriving procedure
move into Assembly.ConvLoading
if procindex = 1 then
begin
travel to Assembly.AssemblySt1
send to P_Assembly(1)
end
if procindex = 2 then
begin
travel to Assembly.AssemblySt2
send to P_Assembly(2)
end
if procindex = 3 then
begin
travel to Assembly.AssemblySt3
send to P_Assembly(3)
end
if procindex = 4 then
begin
travel to Assembly.AssemblySt4 // Another assembly station is added which connects
with painter 4
send to P_Assembly(4)
end
end
/*Change of Final Assembly*/
begin P_Assembly arriving procedure
move into Q_Assembly(procindex)
if OL_LidtoAssembly current = 0 then
wait to be ordered on OL_WaitingforLids
order 1 load from OL_LidtoAssembly to continue
if OL_CuptoAssembly current = 0 then
wait to be ordered on OL_WaitingforCups
order 1 load from OL_CuptoAssembly to die
//Assembly Coffee Cup
use R_Assembly(procindex) for weibull 3, 28 sec
//Extra Packaging Time
if V_AssemblyNum(procindex) > 100 then
begin
use R_Assembly(procindex) for weibull 1.5, 250 sec
set V_AssemblyNum(procindex) = 0
end
else if V_AssemblyNum(procindex) > 10 then
begin
use R_Assembly(procindex) for weibull 1.5, 150 sec
set V_AssemblyNum(procindex) = 0
end
else if V_AssemblyNum(procindex) > 0 then
begin
use R_Assembly(procindex) for weibull 1.5, 120 sec
set V_AssemblyNum(procindex) = 0
end
// Take lids from middle storage when it runs out
inc V_AssemblyLids(procindex) by 1
if V_AssemblyLids(procindex) = 100 then
begin
set V_AssemblyLids(procindex) = 0
use R_Assembly(procindex) for uniform 2, 1 min
end
//Check if the order is finished
inc V_Finished(procindex) by 1
if V_Finished(procindex) = V_AssemblyOld(procindex)
begin
set V_Finished(procindex) to 0
inc C_TotalFinished by 1 // Counting the finished orders
end
move into Q_CoffeeCup
end
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% End of Task C
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%*/