Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Gpss tutorial.pdf
Скачиваний:
323
Добавлен:
15.04.2015
Размер:
1.4 Mб
Скачать

TYPE 1000

SELECT OK

Now we can see cars queuing for passage through the intersection. While the simulation is running, watch the delay chain for each Facility.

CHOOSE Window / Simulation Window / Storages Window

Now we can see cars ready to turn.

When you are done observing the simulation, Halt it if it has not completed.

PRESS o

If you wish to go on to the next lesson, close all windows related to this model.

CLICK ON The X-Upper Right of Each Window

Otherwise, to end the session

CLICK ON The X-Upper Right of Main Window.

18. POWDER.GPS

Simulation of customer brand loyalty.

Problem Statement

A survey was carried out to assess the brand loyalty of customers to 7 brands of soap powder. The probability of change from one type of powder to another, is given in the table below. It is assumed that the customer will purchase either the same brand of powder again (most likely), or change to some other powder (less likely). Therefore the sum of the probabilities in each row of the matrix is equal to 1. The probability of the market share distribution depends on the number of transitions which have taken place (i.e. the number of successive purchases) and the initial market share of each product.

The purpose of the model is to estimate the market share each powder will achieve, in the long term, assuming that the transition probability matrix will remain the same, and assuming that initially all powders have an equal share of the market.

This process of system changes occurring in sequence is called a Markov Chain.

Probability of Customer Changing From Row to Column

SUDS BUBBLES CLEANPLUS SOAPY

BRANDX CLEARSHINE MARVEL TOTAL

SUDS .39 .12 .17 .13 .10 .04 .05 1.0

BRANDX .13 .32 .10 .15 .12 .09 .09 1.0

BUBBLES .15 .14 .25 .14 .17 .08 .07 1.0

CLEARSHINE .11 .10 .09 .40 .08 .09 .13 1.0

CLEANPLUS .05 .12 .16 .09 .37 .14 .07 1.0

MARVEL .16 .13 .08 .05 .16 .28 .14 1.0

SOAPY .08 .10 .09 .10 .07 .13 .43 1.0

Since the table of transition probabilities has no zeroes, we know that all states are in a single chain, and are aperiodic. This assures the convergence of state probabilities in the theoretical Markov Chain, and assures that the simulation will not be trapped in a proper subset of states.

1)Run the model for 500 Transactions.

2)Determine the market share achieved by each product.

Listing

; GPSS World Sample File - POWDER.GPS, by Gerard F. Cummings

***********************************************************************

**

*Brand Loyalty by Customers *

***********************************************************************

RMULT 98851

Check TABLE X$Brand,1,1,8

Transitions MATRIX ,7,7 ;State transition table

Powder FUNCTION X$Brand,M7 ;Pick brand transition 1,FN$Suds/2,FN$BrandX/3,FN$Bubbles/4,FN$Clearshine 5,FN$Cleanplus/6,FN$Marvel/7,FN$Soapy

Suds FUNCTION RN1,D7 ;Transition from Suds 0.390,1/.510,2/.680,3/.810,4/.910,5/.950,6/1.0,7

BrandX FUNCTION RN1,D7 ;Transition from BrandX 0.130,1/.450,2/.550,3/.700,4/.820,5/.910,6/1.0,7

Bubbles FUNCTION RN1,D7 ;Transition from Bubbles 0.150,1/.290,2/.540,3/.680,4/.850,5/.930,6/1.0,7

Clearshine FUNCTION RN1,D7 ;Trans from Clearshine 0.110,1/.210,2/.300,3/.700,4/.780,5/.870,6/1.0,7

Cleanplus FUNCTION RN1,D7 ;Transition from Cleanplus

0.050,1/.170,2/.330,3/.420,4/.790,5/.930,6/1.0,7

*

Marvel FUNCTION RN1,D7 ;Transition from Marvel 0.160,1/.290,2/.370,3/.420,4/.580,5/.860,6/1.0,7

*

Soapy FUNCTION RN1,D7 ;Transition from Soapy 0.080,1/.180,2/.270,3/.370,4/.440,5/.570,6/1.0,7

*

Record FUNCTION X$Brand,L7 ;Records numbers 1,Suds/2,BrandX/3,Bubbles/4,Clearshine/5,Cleanplus/6,Marvel/7,Soapy

***********************************************************************

INITIAL X$Brand,1

GENERATE 1,,,,2 ;One xact every minute TABULATE Check

SAVEVALUE Oldbrand,X$Brand ;Save old brand SAVEVALUE Brand,FN$Powder ;Find new brand SAVEVALUE FN$Record+,1 ;Savevalue of chosen brand ; up by one

MSAVEVALUE Transitions+,X$Oldbrand,X$Brand,1 ;Update ; transitions

TERMINATE 1

The model is organized into several segments. Transactions represent purchases. Each Transaction tabulates the current brand, chooses a new brand, and updates the count of purchases for the new brand.

Running the Simulation

To run the simulation and create a Standard Report,

CHOOSE File / Open

and in the dialog box

SELECT POWDER

and then

SELECT Open

Next, create the simulation.

CHOOSE Command / Create Simulation

then

CHOOSE Command / START

and in the dialog box, replace the 1.

TYPE 500

SELECT OK

The simulation will end when 500 Transactions have entered the TERMINATE 1 Block. This represents 500 purchases.

When the simulation ends, GPSS World writes a report to the default report file,

Powder.1.1. As discussed in Chapter 1, the Report extension will vary depending on saved simulations and previously existing reports. For our purposes, we will assume that this is the first time the simulation has been created and run giving an extension of 1.1.

This report will be automatically displayed in a window. If you close the window, you can reopen it by using the GPSS World File / Open in the Main Menu. Then you

should choose Report in the "Files of type" drop down box at the bottom of the window. GPSS World reports are written in a special format. If you wish to edit the report, you will have to copy its contents to the clipboard and from there into a word processor. You will not be able to open the file directly in a word processor.

Discussion of Results

The approximate market shares are given in the Table Check. However, the results include startup effects.

Inside the Simulation

Let us now explore the ending condition of the simulation which generated the Standard Report above. If you are not at the end of the simulation, please Retranslate the model and run it again.

Now let’s open some graphics windows.

CHOOSE Window / Simulation Window / Table Window and in the drop-down box in the dialog box Check is already selected.

SELECT OK

This shows the histogram representing market shares. Let 's now remove the statistics dependent on the startup conditions. In the M ain Window menu,

CHOOSE Command / Reset

SELECT OK

Now continue the simulation for 100 more Transactions and suppress the Standard Report.

CHOOSE Command / START

and in the dialog box, replace the 1.

TYPE 100,NP

SELECT OK

If we are truly at steady state conditions, you should not see any significant change in the market shares as the simulation runs.

Close the Table Window.

CLICK ON The X-Upper Right of Table Window

Now let’s watch the dynamics of the model. Open a graphics window on the state transition matrix.

CHOOSE Window / Simulation Window / Matrix Window and since Transitions is already selected in the drop-down box of the dialog box

SELECT OK

Now, continue the simulation for 100 more Transactions.

CHOOSE Command / START and in the dialog box, replace the 1.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]