0% found this document useful (0 votes)
9 views20 pages

Simulation Optimization with GAWizard

This chapter focuses on enhancing a Plant Simulation model by introducing batch processing, the ExperimentManager, and the Genetic Algorithm (GAWizard) for simulation optimization. Key adjustments include modifying the assembly line to process two MUs simultaneously, implementing batch constraints, and creating an InitControl method for better worker management. The chapter concludes with an overview of the GA's principles, emphasizing its role in reducing the number of experiments while optimizing system configurations.

Uploaded by

AUTAIN CHOTCHEUA
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views20 pages

Simulation Optimization with GAWizard

This chapter focuses on enhancing a Plant Simulation model by introducing batch processing, the ExperimentManager, and the Genetic Algorithm (GAWizard) for simulation optimization. Key adjustments include modifying the assembly line to process two MUs simultaneously, implementing batch constraints, and creating an InitControl method for better worker management. The chapter concludes with an overview of the GA's principles, emphasizing its role in reducing the number of experiments while optimizing system configurations.

Uploaded by

AUTAIN CHOTCHEUA
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

9 Building a Model: Simulation Optimisation

This chapter will elaborate on some of the extended features of Plant Simulation. First, we will slightly
adjust the model you have built in Chapter 8. We will add some additional constraints to the model,
namely that the engines can only continue on the assembly line in a predefined batch. Furthermore,
we will extend the assembly line such that two MUs can be processed at the same time per station.
This also means that we will add an additional workplace to each station in order to process two MUs
at the same time.

In the second section of this chapter, we will add the ExperimentManager to the model. In Chapter 5
we have already introduced the ExperimentManager, and in this chapter we will continue to build on
that knowledge.

In the third section, we will introduce the Genetic Algorithm, for which Plant Simulation has a specific
tool, namely the GAWizard. We will elaborate on the basics of this tool and algorithm. We will use this
tool to determine what will be the best sequence for releasing the products (within the batch) to the
Assembly Line as you might recall that different product types require different processing steps.

The final section will be about Simulation Optimisation, which is finding the best input variables
without considering each possibility as we have done previously. In the ExperimentManager you will
predefine the experiments you wish to carry out, which is not considered to be a Simulation
Optimisation approach. The Genetic Algorithm is typically an example of Simulation Optimisation.
There are a wide range of algorithms you could use for Simulation Optimisation. In this final section
we will introduce the basics of building your own algorithm, which you can apply to find the best input
parameters for your model. In the assignment of this chapter you will need to build such an algorithm.

Subjects dealt with in this chapter:

x ExperimentManager
x GAWizard
x Simulation Optimisation

9.1 Adjusting the model of Chapter 8


In this section, we will change our model, such that we can use the ExperimentManager and GAWizard
to perform runs, but also the custom runs from the previous chapter. Furthermore, we will make some
adjustments to the assembly line and introduce batch processing. Some code written for the model in
Chapter 8 does not apply for working with the ExperimentManager. So we make some of this code
conditional on whether we perform experiments like we did in the previous chapter, or by using the
ExperimentManager or GAWizard.

We will now start to make adjustments to the ControlPanel to enable the model to run experiments in
different ways. At the end of this chapter, your ControlPanel might look like this:

166
Task: Enable the model to run experiments in different ways

1. Add nine variables to your ControlPanel and name them as follows: AvgAssemblyTime
(data type Real), CostConfiguration (data type Real), TotalProfit (data type Real),
CustomRun (data type Boolean), NrJuniors (data type Integer), NrSeniors (data type
Integer), EngineCost (data type Integer), EngineRevenue (data type Integer), and
EngineLead (data type Real).
2. Set the value of EngineCost, EngineRevenue, and EngineLead to 373, 400, and 0.1
respectively. EngineLead represents the loss of interest of engines during the leadtime,
and is approximately given by the average value of an engine during the leadtime times
the daily interest rate (1.1^(1/365)-1).
3. Set the value of NrJuniors and NrSeniors both to 2.
4. Open the Method Reset.
5. Add the following code:

6. Make the code that sets the random number stream conditional on the use of
CustomRun (experiments without the ExperimentManager or GAWizard):

7. Open the Method EndSim and add the following code just below the line that stops the
EventController:

167
8. Make all lines of code in EndSim below the newly inserted code conditional on
CustomRun in the following way:

Take care of closing this if-statement.


9. The figure from the previous step also shows some modifications to the performance
indicators AvgAssemblyTime and CostConfiguration in the AvgExpResults table, and the
addition of a new indicator TotalProfit. Add these changes to your code as well. Also add
a new column to AvgExpResults and name it TotalProfit with data type real.
10. The last thing you need to change in EndSim is to replace the 5 lines of code related to
the worker settings (from the line [Link] till the line setCreationTable)
with the following:

11. Try to understand the changes you have made to the Method EndSim. To check these
changes, the complete code of the revised Method EndSim can be found in the Appendix.
12. Open the Method Start.
13. Add the following code above the part that resets the experiment tables:

14. Replace the lines of code related to resetting the workers (5 lines) by:

(later on in Section 9.2, we create a new Method to initialise the WorkerPool)


15. Create a copy of the Method Start (right-click on Start and then right-click somewhere
else to remove the pop-up, then press Ctrl-C and Ctrl-V).

168
16. Rename this Method to Start2 and change its icon. This new Method will be used to
initialise the experiments before using the ExperimentManager or GAWizard.
17. Open the Method Start2.
18. Set the value of CustomRun to false and remove all code below the line that sets the end
time of the EventController (code for setting the configuration, resetting the Workers,
and starting the simulation). We will not make using of these elements as they will be
carried out by the ExperimentManager or the GAWizard.
19. Add the following code to the Method WritePerformanceData after the lines required for
code verification (this coding is required for computing the average time spent on the
assembly line per engine):

In the previous task, we have made some adjustments to the Methods Start and EndSim that impact
the initialisation of the WorkerPool. The WorkerPool needs to be set before calling [Link]
(so before calling the initialisation Methods). In the previous chapter, we solved this by setting the
WorkerPool for the first experiment within the Method Start and for all subsequent experiments in the
Method EndSim (so just before running the next experiment). This option is less suitable to be used in
combination with the ExperimentManager and the GAWizard (Sections 9.2 and 9.3). Therefore, we
create a so-called InitControl, which is a Method that is called at the beginning of a simulation run
during the initialisation phase, but before the objects are initialised and before initialisation Methods
are executed. As stated in the Plant Simulation help function, this option is particularly suitable to
change the Worker Creation Table within the WorkerPool.

Task: Setting up an InitControl

1. Create a new Method and name it InitControl.


2. Add the following code:

3. Open the EventController.


4. Click on Tools > Edit Controls.
5. Assign the Method InitControl to Init:

169
We will now start to make adjustments to the AssemblyStation, which requires some rearrangement
of objects. The final model will look like this:

We will first add the additional SingleProcs and WorkPlaces.

Task: Additional Objects

1. Open the AssemblyLine from the Class Library.


2. Copy each of the 7 SingleProcs corresponding to the 7 workstations on the AssemblyLine
(Ctrl-C) and paste them on the same Frame (Ctrl-V) next to the original stations (see
figure above). Connect the copied stations in the same way as the original stations.
3. Copy each Workplace and place it next to the original workplace and make sure that they
are connected.

4. Change the name of each copied WorkStation to WorkStation1, and of each copied
WorkPlace to WorkPlace1. Connect the copied WorkPlaces to the copied Workstations,
e.g., for WPElectricalBattery1:

170
5. Open the Method ExitStation on your ControlPanel.
6. Add the following code after ObjString:=?.name; and try to understand it:

Do not forget to add the required Local Variable (between is and do).
7. Apply the same modification as in ExitStation to EntryStation.
8. Open the Method NewPart on your ControlPanel.
9. Multiply both the Mu and Sigma of the LogNormal distribution by two (resulting in
parameter values 2 and 1 at most). We should be able to handle the increase in
processing times given that we doubled the capacity at each work station.

We now only need to add the constraint of releasing products in batches to the assembly line.

Task: Releasing the Products in Batches

1. Make room between the Welding Line and Assembly Line (see the figure of the final
model).
2. Remove the connection between the BufferAssemblyLine and Line1.
3. Add a Buffer to the Frame AssemblyStation and name it BatchBuffer, use a Capacity of -1
and a Dwell Time of 0.
4. Connect the BatchBuffer with the first line of the Assembly Line.
5. Add five variables to the Frame AssemblyStation and name them respectively XV, XW, XX,
XY and XZ with data type Integer.
6. Add the following code to the Method Reset in the ControlPanel:

171
7. Insert a new Method to the ControlPanel and name it CheckBatch.
8. Add the following code to CheckBatch (see also code in the Appendix):

Note that part of this code is required for the GAWizard, which will be become clear in
Section 9.3.
9. Set this Method as Entrance Control for the BufferAssemblyLine.
10. Add a TableFile to the ControlPanel and name it GAProductSequence.
11. Define for the TableFile GAProductSequence its first column’s data type as a String and
give it the name ObjectType.
12. Fill the column ObjectType subsequently with the following data:
- 6 rows containing XV
- 5 rows containing XW
- 1 row containing XX
- 3 rows containing XY
- 5 rows containing XZ

172
13. In Assignment B2 at the end of the previous chapter, you have changed the arrival rate of
the PartSource. Set the mean time between part arrivals back to the original value of 3
minutes.

We have now adjusted our model completely to make use of the ExperimentManager and the
GAWizard on which we will elaborate in the next sections. But first, let’s validate your model.

Task: Validating your model

1. To validate your model, set the WarmUpLength to 1 day, the RunLength to 10 days, and
the number of replications to 5.
2. Validate your results using a configuration with 4 seniors and no juniors. To avoid running
all the configurations, you can temporarily change the Method SetConfiguration, by
changing the lower and upper bounds for the variables i and j.
3. Run your model by pressing the Method Start, and check if there are any unexpected bugs.
The results for this configuration should be approximately:
- EngineCreated = 4800 ((86400/180)*10)
- EngineFinished = 4800 (should be able to process all incoming engines)
- AvgAssemblyTime = 4444
- CostConfiguration = 40,000 ((0*500 + 4*1000)*10)

9.2 The ExperimentManager


The ExperimentManager has been introduced already in Chapter 5. Just like the model in this chapter,
the model of Chapter 5 had counters, input variables, and certain output values. You defined your own
experiments by setting different values for the input variables in Section 5.8. In the case of just one
factor, with a limited number of possible values, it might be easy to define all experiments yourself.
However in the case of multiple factors, the required number of experiments might grow very large
very fast, especially when there is an unclear interaction between input variables, not to mention the
use of continuous variables instead of discrete variables. The ExperimentManager can help you
defining all the required experiments. There are three possible options we will review in this section.
But first we need to add the ExperimentManager.

Task: Setting up the ExperimentManager

1. Add the ExperimentManager to your ControlPanel.


2. Set LineCapacity, NrSeniors, and NrJuniors as Input Variables.
3. Set AvgAssemblyTime and CostConfiguration as Output Values.

The ExperimentManager now defines the setting for LineCapacity, NrSeniors, and NrJuniors, and is
ready to be used. There are several options for this, which we will not demonstrate in full detail since
they speak for themselves. The three most interesting options are shown in the figure below.

173
The Multi-level Experimental Design option lets you specify:

x A lower bound for the input value


x An upper bound for the input value
x An increment size for every input variable

After you clicked OK, the ExperimentManager generates every possible experiment given your input.
A pop-up appears showing a warning that new experiments are defined and that previous experiments
will be overwritten, if you have defined experiments already. The Random Experimental Design also
lets you enter a lower and upper bound, but not the level of increment, since all values will be
determined at random within the defined ranges. The Two-level Experimental Design only creates
experiments for a minimum and maximum value of every factor. This design is also denoted by a 2k-
factorial design.

174
9.3 The Genetic Algorithm
As shown in the previous section, multi-level experiments can quickly lead to a huge number of
simulation runs. Especially when considering all possible combinations of a large number of input
factors. The number of alternative configurations to simulate and compare could then literally be in
the hundreds of thousands. By the application of the so-called Genetic Algorithms (GA’s), the absolute
number of experiments carried out is reduced considerably while there is still a chance of finding good
solutions. GA is a biology-based general optimisation technique and a particular class of the
evolutionary computation algorithms. The origin of this algorithm is the process of natural selection:
individuals who adapted best to their environment, procreate the best. GA helps us to decide what
alternative system configurations to simulate as well as how to evaluate and compare their results.

In the upcoming paragraphs, we will start with describing the principles of GAs in more detail and
pinpoint characteristics of well-suitable problems to deal with by GAs. Subsequently, we extend the
model we created so far by implementing the GAWizard of Plant Simulation to a new arising
optimisation problem. In the model we restrict ourselves to implementing only one optimisation
problem, although the GAWizard can be used for more types of optimisation problems as we discuss
later on.

The GA algorithm starts with an initial population of solutions (i.e., configurations of input
parameters). A solution together with the corresponding solution value, is called an individual. Solely
the solution, so without solution value, is called a chromosome. The solution value of an individual is
denoted by fitness value. The population of defined individuals form a so-called generation. By
considering the fitness values of all individuals within a generation, the algorithm performs all kind of
(on nature based) operations to create a new generation. These new solutions are denoted by
offspring, while the individuals of the previous generation are denoted by parents. Obviously the
higher the fitness value of an individual, the more chance is has to reproduce.

Offspring is formed by using several operators. From (most of the time) high to low probability of
occurrence possible, these operators are:

x Selection, the fitter an individual solution the more times it is likely to be selected to
reproduce
x Crossover, a random exchange between two chromosomes to create offspring
x Inversion, inverts a chromosomes’ sequence within a defined range
x Mutation, a random flip within a chromosome

The size of individuals in a generation is limited. As a result, the parent generation dies and the
offspring generation is becoming the new parent generation. The figure below illustrates the basic
evolution idea graphically.

175
Usually, the process of creating new generations is done until one of the following conditions is met:

x Tolerance threshold is reached


x Maximum number of generations has passed
x Maximum amount of computational time has passed
x Fitness value has plateaued

176
GAs provide good solutions for complex problems but do not guarantee that a global optimum will be
found. GAs are less suitable for optimisation problems that have a few narrow peaks (good solutions)
and a lot of solutions with almost similar fitness values, since the fitness does not direct the algorithm
towards the peaks in most of the cases. On the other hand, GA will be effective in situations with
multiple peaks with similar fitness values. As mentioned in the Plant Simulation help files (Add-Ins
Reference Help > Genetic Algorithms > Genetic Algorithms and Simulation > Optimization Tasks),
typical problems for which GAs are considered to be a suitable solution approach are characterised
by:

x Complex and large solution space, such as combinatorial optimisation problems


x Unknown characteristics of the solution space
x Discontinuities within the solution space that do not allow for mathematical-numerical
optimisation
x Many soft restrictions, which are restrictions that do not necessarily have to be kept, but lead
to worse results

Now that we know the basics about GA and the GAWizard, we will implement the GAWizard in our
model. The dialog window of the GAWizard has the following interface:

In the next task we will set the correct settings for determining what the best sequence is for releasing
our products (within the batch) to the Assembly Line.

177
Task: Implementing the GAWizard

1. Add the GAWizard (from the Class Library under Tools) to the ControlPanel.
2. Input and output factors can be imported for the GAWizard in a similar manner as for the
ExperimentManager. Hold down the Shift-Key and drag-and-drop the GAProductSequence
table to the GAWizard. If we now open the Sequence table, we can see that there are two
columns added: Origin and Chrom. The column Origin consists of the original row
sequence and the column Chrom contains the sequence which belongs to one particular
individual. We show later on that the GAWizard changes this sequence.
3. Open the GAWizard and click on Open next to Optimization parameter. A table is shown
that presents the problem definition for the GAWizard. This table should look as follows:

4. Drag-and-drop the AvgAssemblyTime to the GAWizard (without holding down the Shift-
Key). Check if this variable is included within the fitness calculation by opening the fitness
calculation table within the GAWizard:

5. Open the GAWizard and set the number of generations to 3, size of generation to 4, and
the number of observations per individual to 3. Leave the optimisation direction to
minimum and press the Apply-button. Note that we set the GA-parameters relatively low
on purpose to illustrate the idea. Note that if you get an error stating “Wrong HTML
directory” after pressing the Apply-button, go to the tab Miscellaneous and uncheck the
box before “Save the report after the experiment run”.
6. The GAWizard only optimises the product sequence. You need to set the other
experimental factors by hand. Set the value of the variables NrJuniors, NrSeniors, and
LineCapacity to 0, 4, and 2 respectively.
7. First click the Method Start2 to reset the experiments. Next, go to tab Run of the GAWizard,
click Reset, and then Start to start the optimisation. It could take a few minutes before the
GAWizard is finished.

178
8. After the GAWizard is finished, a dialog shows the time and you can analyse the behaviour
of the parameters in the HTML-report (press the button Show under the tab Evaluate). You
should see a figure similar to this:

The best input parameters are set into the model, the corresponding solution can be found
in the table GAProductSequence. If you want to get back to the initial settings, just press
the Reset-button in the GAWizard on the tab Run (the sequence from the column Origin
will be restored).
We can stop the optimisation run after the individuals of the active generation have been
completely evaluated and then modify the settings and the parameters of the object
GAWizard. In that way we can decide after a while, for instance, to add more generations
or to increase the probability of a cross-over. To stop the simulation run during the GA-
optimisation, we can click on Stop on the tab Run. As long as there are still individuals
evaluated of the current investigated generation, the button shows Wait. When these
evaluations are done, we can modify the parameters and press the Start button again.

Did you know?

In the first generation, Plant Simulation evaluates the number of generations that you have entered
in the wizard as the size of the generation. In each of the subsequent generations, the GAWizard
evaluates twice as many individuals. In addition, you may also need multiple observations for
evaluating the fitness values appropriately. When, for example, you use 5 observations for
evaluating an individual and create 100 generations with a size of generation of 30, Plant
Simulation has to execute 5970 simulation runs (5* (30 + 2 * 30 * 99)).

179
As you might have noticed, you can change a lot of settings in the GAWizard. The changeable aspects
are not limited to setting the number of generations, size of generations, and observations per
individual only. Concerning the output (defined in the fitness calculation), you can either have a
TableFile defined with your factors or create a Method of your own to define an output factor. In the
TableFile you can give output factors weights. For the input factors, you can also use a TableFile or
Method.

To modify the GA-settings, such as the selection rules, you can open the GAWizard, open the tab
Objects and go to GA Control. If you want to adjust more advanced settings of the GA, you can either
open the Controls tab in the GAWizard or press the ALT-key while double-clicking on the GAWizard in
your Frame. The latter option reveals the underlying Frame of the GAWizard. It requires some more
understanding of how the GA works, but to make modifications you should look at the GAAllocation,
GAOptimization and GASequence (hidden in SeqLoc) objects.

Did you know?

Plant Simulation contains a myriad number of interesting examples about working with the
GAWizard. To examine these examples, open Plant Simulation to show the Start Page. In this page
you select Examples/Infos under the Getting Started headline. Scroll down to the Concise Modeling
Examples and click the Examples collection. Choose as category Tools and optimization, with as
topic Genetic algorithms. Several examples are exposed there. In addition, in the Examples/Infos
screen the Due Date Optimization model presented under Example Models also makes use of the
GAWizard. For your simulation models, you might get inspired by these examples.

The optimisation task you did can be described as a sequencing task. The GAWizard can be used for
allocation tasks and selection tasks as well. When you drag-and-drop objects into the GAWizard, it
automatically knows which kind of task it should perform. In a sequence task, a sequence is varied
(stored in a list) for each experiment to determine an optimum. In addition, you can define position
restrictions for each item in the sequence by entering the permitted positions for each item in the
object GASequence within the GAWizard. For instance, you can define that product X must be the first
in the sequence in all the cases. An allocation task assigns numerical values between minimum and
maximum values. An example of these kind of tasks is the buffer size allocation. You can easily insert
these input factors by drag-and-drop, manually inserting via the optimisation parameter table, or
through configuring your own Method. The selection optimisation task works almost similar to the
allocation tasks; however, now there is a predefined number of alternative input factors that do not
necessarily have numerical values but could also be categorical. For instance, you can drag-and-drop
(with shift-key) a Sorter object into the GAWizard and choose the Order-property. Then you have to
define the possible values it can take in the input table. Also more advanced (combinatorial-
optimisation) tasks can be implemented as selection tasks. Ultimately, the main advantage of the
GAWizard is the wide applicability and ease of implementation.

Did you know?

In principle you can define both sequence and allocation tasks as selection tasks. This has
advantages, but also some drawbacks. We leave it up to you to investigate this difference by
exploring the Plant Simulation help documentation. We recommend that if you have (simple)
sequence or allocation tasks, you should implement these as such tasks and not as selection tasks.

180
9.4 Simulation Optimisation
In Simulation Optimisation, we search for the best settings of experimental variables given a limited
budget regarding computation time. Regarding the latter, we want to spend our computation time
wisely by exploring the whole search space without spending too much time on non-promising
settings.

Up to this point, we designed three ways of performing experiments:

1. Experimentation using the Method EndSim in combination with a table Configurations.


2. Experimentation with the ExperimentManager.
3. Experimentation with the GAWizard.

In the first two options, we defined all experiments beforehand, irrespective of their solution quality.
In the last option, the experiments are not predetermined, but the search is directed towards
promising solutions throughout the generations. However, the third option still assumes an equal run
length and equal number of replications per experimental setting. Obviously, it would make sense to
let this depend on the quality of the solutions found so far. For example, once we could say with a
certain confidence that a given setting is worse than an earlier evaluated setting, we could stop
simulating this setting. Another thing we did not consider so far was optimizing over all experimental
settings simultaneously. In the first two options, we only varied the number of workers. In the third
option, we only optimised over the assembly sequence.

In the remainder of this section, we show (i) how the third option can be extended by adding the
remaining experimental factors, and (ii) how the first option can be used to determine the
experimental settings on the fly.

Task: Extending the GAWizard

1. Hold down the Shift-Key and drag-and-drop the variables NrJuniors and NrSeniors to the
GAWizard.
2. Change the objective value in the GAWizard by opening the table under Fitness
calculation on the tab Define and replacing AvgAssemblyTime with TotalProfit.
3. On the same tab, set the Optimization direction to Maximum (confirm using Apply).
4. Open the Method EndSim.
5. Change the line of code to compute the TotalProfit by making sure negative values are
set to zero, by using max(0,…), because the GAWizard is not able to handle negative
values.
6. Run the GAWizard. When running GA for 10 generations, with generation size 5 and
observations per individual 5 (confirm using Apply), the results could be something like
this (running time approximately 10 minutes):

181
Experimentation with the GAWizard can also be performed in stages. For example, using the setup
from the previous task, you could first perform a run for, say, 10 generations. Then look at the resulting
best sequence from the table GAProductSequence, copy this sequence (first column) to memory, reset
the GAWizard (the original sequence will then be placed in the table) and copy back the sequence
from memory. In a second stage, you then start with a better initial solution. In addition, you could fix
some of the values to a smaller search domain (e.g., number of workers between 2 and 4).

Task: Create a custom Simulation Optimisation Method

1. Open the Method Start.


2. Comment all lines of code that use the Method SetConfiguration or TableFile
Configurations, since we no longer use predefined configurations.
3. Set initial values for NrJuniors and NrSeniors in the Method Start:

4. Create a new Method and name it SimOpt.


5. Open the Method EndSim.
6. Remove the whole code (Ctrl-X) below the computation of TotalProfit that is made
conditional on CustomRun and paste (Ctrl-V) the code into the Method SimOpt. Now call
the Method SimOpt from the place where you removed the code, such that the remaining
code for EndSim looks as follows:

182
In principle, your model should still run as before, except that it starts with given initial
settings and that after the running the required replications, it uses the empty table
Configurations to set the next configuration.
7. Add a TableFile and name it SOresults.
8. Give the table the following format:

Where the data type Table of column 5 consists of 1 column of data type Real.
9. Open the Method Start.
10. Add code to empty the table with Simulation Optimisation results ([Link]) just
below the code for emptying the other tables.
11. Add the following code to SimOpt just after updating the table AvgExpResults and try to
understand its purpose:

183
12. Change the code in SimOpt that sets the number of workers in the following way:

13. Open the Method Reset.


14. Let the RandomNumbersVariant depend on the variable RunCounter instead of CurrRun:

This change is necessary to avoid using the same configuration over and over again due
to the previous use of Common Random Numbers.
15. Set the variable TotalExp on the ControlPanel to 25.
16. Run your model by clicking the Method Start.

The simulation optimisation procedure developed in the previous task is quite simplistic in the sense
that it randomly generates the next configuration, without considering the value of configurations
already executed. However, the code in SimOpt can be extended quite easily to let the values of
NrJuniors and NrSeniors depend on earlier results. For example, we can evaluate the different
neighbours of the current solution by adding/removing a single worker, then set the best configuration
as current solution and repeat the procedure.

Another extension would be to make the number of replications variable. For example, in first instance
we could perform a limited number of replications per configuration. After a while we could spend
more replications on the more promising configurations to increase our confidence in their value.

A final extension is the use of a flexible stopping criterion. Currently, we use a fixed setting for the
number of configurations to consider (25). An alternative would be to let it depend on the convergence
of results. For example, when the improvements in found solution values are limited, or no
improvement have been found during the past simulation runs, we might decide to stop.

9.5 Assignment B3: Simulation Optimisation


In this chapter, several ways of performing experiments and finding good configurations were
introduced. However, we only briefly explored their use without considering all options available.
Furthermore, we only considered a limited set of experimental factors. In this assignment, you are
asked to apply the three ways of experimenting, i.e., using the ExperimentManager, the GAWizard,
and your own Simulation Optimisation approach, more extensively to provide recommendations to
the car manufacturer CeeCar Inc. regarding the optimal design of the assembly line.

Assignment B3.1: Use the ExperimentManager to perform experiments of the following types: multi-
level experimental design (full factorial), random experimental design, and two-level experimental
design (2k-factorial design). For the 2k-factorial design, use TotalProfit as reset value: the value for
which the main effects and two-way interaction effects are calculated. The latter effects can be found
in the ExperimentManager under Tools > Analysis of Factors. Compare the usefulness of the three
different types of experiments and specifically argue why a 2k-factorial analysis is less appropriate here.
Repeat the 2k-factorial analysis using AvgAssemblyTime as reset value and reflect on the outcomes.

184
Assignment B3.2: Use the ExperimentManager in combination with the GAWizard to evaluate a whole
range of possible experimental settings considering the factors NrJuniors, NrSenior, LineCapacity, and
arrival rate of the PartSource. The logic of varying the arrival rate (interarrival times or engines) is that
it is not directly clear what setting would result in the best performance: a higher arrival rate might
result in higher revenues from selling the engines, but also in higher employee costs, and vice versa.
To do this, first use the ExperimentManager to get an idea of a promising search area. Use the resulting
search area as input for the GAWizard.

Assignment B3.3: Create your own Simulation Optimisation approach by extending the Method
SimOpt (possibly in combination with extending the TableFile SOresults and adding additional Methods
and TableFiles). In this extension, the decision regarding the next configuration to consider (to
simulate) should depend on the results of previously evaluated configurations. Optionally, you may
even go further by using a variable number of replications depending on the values of the
configurations and use a dynamic stopping criterion, as mentioned at the end of Section 9.4.

Assignment B3.4: Provide advice to CeeCar Inc. regarding the optimal design of their assembly line,
taking into account the different criteria that might be relevant for their final investment decision.
Write down your analysis and provide compelling figures to support CeeCar Inc. in their multi-criteria
decision making.

Deliverables:

x The model from Assignment B3.3.


x A report consisting of a description of your approach used in Assignments B3.1-B3.3,
explanation of your Simulation Optimisation approach from Assignment B3.3, the results
from Assignments B3.1-B3.3, and an in-depth analysis of the experimental results, supported
by tables and figures (Assignment B3.4).

185

You might also like