Difference: CourierServiceInputOutput (1 vs. 20)

Revision 202012-07-30 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 192012-07-27 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 182012-07-27 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 172012-07-27 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 162010-09-21 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 152010-09-21 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 142010-09-21 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 132010-09-21 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 122010-09-21 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 112010-09-21 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 102010-09-21 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 92010-09-20 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 82009-09-28 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 72009-09-16 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 62009-09-11 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 52009-09-07 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 42009-09-07 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 32009-08-28 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 22009-08-28 - MichaelOSullivan

Line: 1 to 1
 
META TOPICPARENT name="SubmitCaseStudy"

Revision 12009-08-28 - MichaelOSullivan

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="SubmitCaseStudy"
<--
This template controls both the look and functionality of case study topics.
You should not need to alter the layout, only edit the data using the form above.

Set the view and edit templates: Comment out the next line to use the TWiki default view

Comment out the next line to use the TWiki default edit -->

<--
This topic can only be changed by:  
-->

Case Study: Input and Output for a Courier Service Model

Submitted: 28 Aug 2009

Operations Research Topics: SimulationModelling

Application Areas: Logistics

Contents

Problem Description

This case study is an extension of the Modelling Requests to a Courier Service case study. It examines ways to determine the inputs for the simulation model and also how to analyse the outputs from the simulation.

Before starting this case study you will need to complete the Modelling Requests to a Courier Service case study.

Return to top

Problem Formulation

See the Modelling Requests to a Courier Service case study for the details of the problem formulation. The complete logic for the model is shown as an Arena model in Figure 1.

Figure 1 Arena model for a courier service

courier_logic_finished.png

Return to top

Computational Model

Finding Input Distributions

As discussed previously, the courier company has recorded data on their delivery requests and delivery runs. This data is given courier.xls.

We can use Arena's built-in Input Analyzer to determine distributions that fit the data well. First, we need to break the data up into separate text files as shown in Figure 5.

Figure 5 Splitting data into text files

courier_prep_data.png

Then, we can use the Input Analyzer to determine the appropriate input distributions. The Input Analyzer uses the Chi Square and Kolmogorov-Smirnov goodness-of-fit tests to determine which distributions fit best. Once you have determined the best distributions, you can cut-and-paste their expressions into the appropriate submodels and run your simulation model again. The following flash tutorial shows how to add use the Input Analyzer to determine the input distribution for Inner City delivery requests:

Debugging

After using the best fit for both the time between delivery requests and them time to make a delivery run, you should get an error while running replications as shown in Figure 6.

Figure 6 Error while running simulation with best fit distributions

courier_input_error.png

This error happens because we are creating a batch of size 0 (Invalid set size: 0). This can only happen if we start loading when there are no requests in the Wait for Inner City Delivery queue, which can only happen via a timed trigger. Thus, a timed trigger has started a delivery when there are no delivery requests in the queue. This can happen if the Inner City Oldest Undelivered entity is delivered via a maximum load trigger and no new requests arrive before the timer expires and also triggers a delivery. In this case the condition for triggering a delivery in Is Inner City Oldest Undelivered, i.e., TNOW - Inner City Oldest Undelivered >= Inner City Max Time is satisfied, even though the oldest undelivered has actually been delivered.

Fortunately the bug fix is easy. We just need to make sure there are delivery requests waiting before triggering a timed delivery, i.e., makes the change shown in Table 1.

Table 1 Amended condition

Name Is Inner City Oldest Undelivered?
Type 2-way by Condition
If Expression
Value (NQ(Wait for Inner City Delivery.Queue) > 0) && (TNOW - Inner City Oldest Undelivered >= Inner City Max Time)

After fixing this bug you should get the results are shown in Figure 6.

Figure 6 Results after input analysis

courier_input_time.png

courier_input_util.png

Using the Data

IMPORTANT You should save your model file under a new name before adding the empirical distributions as shown below. In the Results section we will compare the 2 model files.

Instead of using the Input Analyzer to estimate distributions, we can use the empirical distribution. The empirical distribution uses the histogram of the data to create a cumulative distribution function which it then uses to generate either discrete or continuous observations. In this example we will use the continuous distribution to generate interarrival times and processing times, i.e., the time taken for a courier run. The following flash tutorial shows how to get the empirical distribution for Inner City delivery requests:

Note that the once you have changed the generation of delivery requests, you can check your model. However, you will get an error complaining about using a value of 0.00 for an interarrival time. The first entry of your empirical distributions is (0.00, 0.00, ...), i.e., there is a very small (0.00 to 3 significant figures) chance of an observation of 0.00. If this happens an infinite number of times for an interarrival time (very small probability, but theoretically possible), then there may be an infinite loop, so Arena does not allow this. Simply remove the first 2 0.00 entries (thus removing the possibility of a 0.00 interarrival time, a reasonable assumption) and your Arena model will run (note that this is shown in the previous flash tutorial).

Return to top

Results

Now we have finished building simulation models with different input distributions, we will compare our models. We can compare two simulations by creating data files giving output for each replication and comparing them in Arena's Output Analyzer.

First, add a Statistic to both models (for the fitted input distributions and the empirical distributions) that records the average utilization of the Inner City Courier and the time for an Inner City delivery request to be made. The following flash tutorial shows how to add these statistics for the input distribution model:

Table 2 and Table 3 show the input values for the statistics for both models. Make sure to give your output files different names for the two models.

Table 2 Statistic Inputs for Input Distribution Model

Name Inner City Busy
Type Output
Expression
DAVG(Inner City Courier.NumberBusy)
Output File inner_city_busy_input.dat

Name Inner City Total Time
Type Output
Expression
TAVG(Inner City Delivery.TotalTime)
Output File inner_city_time_input.dat

Table 3 Statistic Inputs for Empirical Distribution Model

Name Inner City Busy
Type Output
Expression
DAVG(Inner City Courier.NumberBusy)
Output File inner_city_busy_empirical.dat

Name Inner City Total Time
Type Output
Expression
TAVG(Inner City Delivery.TotalTime)
Output File inner_city_time_empirical.dat

Next, we can use the Output Analyzer to compare the different models. IMPORTANT Before using the Output Analyzer you need to generate the data files set up in Table 2 and Table 3 by running both your simulation models. The following flash tutorials show how to start the Output Analyzer and then use it to compare the means of two models (make sure to use Lumped for replications):

Figure 7 shows the confidence intervals generated by Output Analyzer. They measure the difference of the mean values, i.e., average number of busy couriers, for the inner city couriers and the metropolitan couriers. The difference is the mean from the fitted distribution model (input) minus the mean from the empirical distribution model (empirical). Notice that both confidence intervals span 0, so there is no evidence against no difference between the means. We can reduce the size of the confidence intervals by reducing the variance, i.e., running more replications.

Figure 7 Results after output analysis

courier_compare.png

Return to top

Conclusions

The simulation model of the courier company provides different measurements of several aspects of the courier service. In this case study we looked at the average number of couriers needed for inner city deliveries and the total time for an inner city delivery request to be made.

We considered these statistics using a couple of different models, one that estimated distributions for the data and one that uses the empirical distribution of the data, i.e., it modelled the data explicitly.

The simulation results showed that there was no evidence to reject the hypothesis that both distributions gave the same mean, i.e., average number of couriers busy and average total time in the system for requests. We need to investigate further to see if we can find a model that is more appropriate. This extension is known as model calibration and is demonstrated in Calibrating the Courier Service Model.

Return to top

<--

-->

<--

-->

  • courier_logic_finished.png:
    courier_logic_finished.png

META FORM name="OpsRes.CaseStudyForm"
FORM FIELD Title Title Input and Output for a Courier Service Model
FORM FIELD DateSubmitted DateSubmitted 28 Aug 2009
FORM FIELD CaseStudyType CaseStudyType TeachingCaseStudy
FORM FIELD OperationsResearchTopics OperationsResearchTopics SimulationModelling
FORM FIELD ApplicationAreas ApplicationAreas Logistics
|*FORM FIELD ProblemDescription*|ProblemDescription|This case study is an extension of the Modelling Requests to a Courier Service case study. It examines way to determine the inputs for the simulation model and also how to analyse the outputs from the simulation.

Before starting this case study you will need to complete the Modelling Requests to a Courier Service case study.| |*FORM FIELD ProblemFormulation*|ProblemFormulation|See the Modelling Requests to a Courier Service case study for the details of the problem formulation. The complete logic for the model is shown as an Arena model in Figure 1.

Figure 1 Arena model for a courier service |

FORM FIELD ComputationalModel ComputationalModel The computational model...
FORM FIELD Results Results The results...
FORM FIELD Conclusions Conclusions In conclusion...
FORM FIELD ExtraForExperts ExtraForExperts
FORM FIELD StudentTasks StudentTasks
META FILEATTACHMENT attachment="courier_logic_finished.png" attr="h" comment="" date="1251430374" name="courier_logic_finished.png" path="courier_logic_finished.png" size="4218903" stream="courier_logic_finished.png" tmpFilename="" user="MichaelOSullivan" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback