Sie sind auf Seite 1von 20

IOE 474 Review

EXAM I
Lecture 1
 Components of a System  Discrete
 Entity - Customers  Model’s states change only at discrete set of
 Attribute – Buying Habits (groceries) points in time – number of cars in parking lot
 Activity - Strolling through aisle  Continuous
 State of a system - # customers in each  Model’s states change continuously in time –
aisle Water level in reservoir, weight of person
 Event – (started/finished aisle)
 12 Steps in a Simulation Study
 Endogenous/exogenenous (activity,
event) – Utilization of aisles by  Formulation (What is the problem?)
organization of merchandise  Define Project Goal and Plan (Is simulation
 Dynamic Model appropriate?)
 Represents a system as it changes over  Model Conceptualization
time (performance of a checkout counter  Or Data Collection
depends on customer arrival rate)  Model Translation
 No random variables – inputs result in  Verified? (Is code ok?)
know outputs  Validated? (Represents system well?)
 Static Model  Experimental Design (What runs to make to
 Represents a system at a particular point answer question efficiently?)
in time, time independent (closing price  Production Runs & Analysis (Estimate the
of stock, outcome of dice)
performance measures)
 Random variables – represent
probabilities and uncertainties of system  More Runs?
 Documentation & Reporting (Scope of this class)
 Implementation
Lecture 2
 Simulation Software Work?  Set
 System State – a collection of variables  An ordered list of associated entities or
that contain all the information events (queue, chain)
necessary to describe the system  Clock
 FEL – Future Event List, contains all
 A global variable representing time in
event notices scheduled to occur in the simulation
future
 Basic Concepts for Simulation  Steps in Discrete Event Simulation
 Determine what event will occur next
 Clock – variable representing
simulated time  Set simulation clock equal to the time

 List – logically ordered collection of


of next event
associated entities (queue)  Update statistical variables

 Event List – List of event notices  Perform actions (and computations)


(current events, future events, blocked associated with event
list)  Schedule events caused by this event
 Activity – specified duration of time, /event list
IAT and ST  Future Event List
 Delay – unspecified duration of time  FEL is ordered by time chronologically
(wait)
 Variables – values for calculations
Lecture 3
 Random Number Generation
 For value to follow a certain
distribution
 Use value obtained by Rand() function
as the Cumulative Prob and use an
inverse function to obtain the
corresponding percentile
 Framework
 Determine the characteristics of each
of the outputs
 Determine the activities, events and
system states
 Determine model responses or
performance measures
 Construct a simulation table
 Step, Xn,
 For each step i, generate a value for
each activities, compute system states
and outputs
 When simulation ends, use the outputs
to compute measures of performance
Lecture 4
 Modules in Build Menu  Locations
 Locations – physical locations for machines,  Capacity – refers to the maximum number of
queues, conveyors, resources entities at a location
 Entities – people, products, which move through  Units – refers to the number of similar locations
or are processed by system in a grouping
 Processes – that which happens to an entity at a  Stats – define what level of detail to collect
location (None, basic, time series)
 Arrivals – the way entities enter a system  Rules – Select Incoming (which entry gets
 Resources – required to perform operations, but admittance when selecting all entries that wish to
without physical location enter), Queuing for output (determines who can
 Path Networks – a map for resource motion compete to go into next location), Selecting a
unit (only for more than one unit)
 Attributes – variables for entity or location  Downtimes – clock downtime, entry downtime,
 Variables/arrays/tables/subroutines/macro/file usage downtime, setup downtime
– just like in other programming languages
 Streams – control over mechanism for getting
 Processes
random numbers  Define the routing of entities through the system
and what operations take place
 Entities  Processes, Operations, Routings
 Items that are processed by the system, such as
products, pallets, or even paperwork  Routings
 Entities move between locations according to  Entities get routed to a location according to a
processing logic rule, user condition
 Dummy entities can be used to make simulation  Move
function correctly  No routing blocks in operation logic, then all
 Arrivals routing will be executed in sequence upon
completion of operation logic
 Arrival defines the entry of entities into the
system
 Frequency – IAT
Lecture 5
 Global Variables  Statements
 Can be accessed from  Wait <time>: simulates the
anywhere in the model time it takes to process an
 Created using variables edit entity
table  Wait Until <Boolean

 Local Variables Expression>: Delays the


further processing until the
 Created within a logic
Boolean expression is true
 Type of a local variable is
 Move for <time>: simulates
defined by using “INT” or the move time
“REAL” statements
 Combine <number>:
 Private to each entity logic
accumulates and combines
processing. Each entity number of entities into a
going through this logic single entry
creates its own local variable
 INC <variable> / DEC
<variable>
Lecture 6
 Four Steps in Developing an Input Model  Q-Q Plot construction
 Collect data from the real system  Step 1: Order the data
 Identify a probability  X(j) – smallest to largest
 Develop a frequency distribution or histogram of  J–n
the data  Step 2: q=(j-0.5)/n
 Choose a family of distributions  q(j)
 Choose parameters  Step 3: Compute gamma(y) based on the inverse
 Evaluate distribution of F(x).=F-1(q(j))=q(j)=gamma(j)
 Discrete Bounded [a,b] distributions  Step 4: Plot gamma(j) vs X(j)
 Discrete uniform – models complete uncertainty  Yi’s are known as order statistics
(equal outcome)  If F is from an appropriate distribution, should
 Binomial – Number of successes in n trials create a straight line
 Discrete Unbounded [0,infinity]  Continuous on [0,inf)
 Poisson – number of independent events that  Gamma – an extremely flexible distribution used
occur in a fixed amount of time or space to model nonnegative random variables
 Negative Binomial – Number of trials required to  Erlang – Models processes that can viewed as the
achieve k successes sum of exponentially distributed processes
 Continuous on (-inf,inf)  Continuous on [0,inf)
 Normal – distribution of a process that can be  Weibull – models the time to failure
thought of as the sum of a number of component  Lognormal – process that can be thought of as
processes the multiplication of a number of component
 Continuous on [0,inf) processes
 Exponential – time between independent events,  Continuous on [a,b]
memory less  Beta – extremely flexible distribution used to
model bounded random variables
 Continuous uniform – complete uncertainty
 Triangular – minimum, most-likely, and
maximum values are known
Lecture 7
 MLE – used to estimate the parameters we  K-S Goodness of Fit Test
need for the distribution we have chosen.  Formalize the idea behind the q-q plot
(choosing the parameters)  Small sample sizes
 Testing the Distribution  Designed to test: H0:X1,X2,…Xn
 Evaluate distribution and associated parameters  CDF of U(0,1), F(x)=x, 0<=x<=1
 If fit is poor – repick distribution family  Sn(x) : the accumulated counts of Xis until x,
 Chi-Squared Goodness of fit test normalized by the total sample size, N
 X1, X2, … Xn are n i.i.d. samples from RV X  Sn(x) = Counts of samples X<=x/n
 H0: X has pdf f(x)  Steps of KS test for Uniform CDF
 Definte pi=p(ai-1<=x<=ai)  1 – Rank the Ris from smallest to largest
 Probability that an observation falls within the  2- Compute
ith interval  D+=max{i/N-Ri}, for I from 1 to N
 Oi: numbers of observations that fall in the ith  D-=max{Ri-(i-1)/N}, I from 1 to N
interval  Sample statistic – D=max{D+,D-}
 Oi~Bin(n,pi) – Binomal-Normal-Chi-Square  Find critical value, Dalpha
 Ei=E[Oi] – expected numbers of observations  If D>Dalpha, reject H0
that fall in the ith interval
 P-Values
 Guideline – choose n and pi
 Significance level (alpha) – prob of falsely reject
 Calculate chi-squared statistic :∑(Oi-Ei)^2/Ei H0
 Compare to X^2(k-1-s),alpha  Higher the p-value, the better the fit is
 S: number of parameters estimated
 Alpha: significance level
 Anderson Darling
 If x^20>X^20(k-1-s,alpha) Reject H0  Weighted average of the squared differences
between observed and hypothesized
 Picking ai’s distributions
 Equal probability – continuous  Weight function: 1/F(x)*(1-F(x))
 Equal interval – ai-ai+1=ai+a-ai (discrete)
 Lambda = 1/Xbar
Lecture 8 – Logic Elements
 General Functions  General Options
 Math functions  Stop, graphic, prompt
 + - * / Mod **  System Functions
 INC, DEC  General
 EXP(), LN(), Sqrt()  Cap, contents, freecaps, freeunits, entries, units
 Rand(), Round()  Percentop, percentUtil, timeused
 FORMAT()  Clock, CalMin, CalHour, Calday….
 Real(0, Trunc  ArrayDims
 Distribution Functions  Entity-specific: Groupqty, resqty, ownedresource
 Discrete:  Resource-Specific: Last, Next
 BI(n,p)  Downtime-Specific: Down, DTLeft, ForLocation
 GEO(p)  Cost: GetCost, GetResRate, IncEntCost
 P(frequency): poisson  Entity/Resource Related Operation
 Continuous Statements
 E(m) – exponential  Resource related (Free, Get, Jointly Get, Use)
 G(a,b): Gamma(shape, scale)
 Entity-Related (Accum, Group, create, route,
 U(m, hr): Uniform(mean, half range) move, move for, wait, wait until, match)
 N(m,s): Normal(mean, stdev)
 Distinguishing Entities
 Actions and Statements  Method 1: Multiple entities
 General Actions
 Method 2: Attributes
 Activate, Animate, Debug, Display, DynPlot, Log
 Method 3: Priorities
 Pause, report, reset
 Return, send, sound, trace
 General Control Statements
 If. Then. Else
 Begin End, Break, Do..Until, Do.. While, Goto
Lecture 9
 Resources  Using Resources
 General: human labor,  USE: get and use resources
special tools, perform for specified period of time
processing on entities,  GET: Get resources as mad
maintain locations and available
resources, etc  JOINTLY GET: Get none
 Transporters: human labor, until all requested resources
AGV, forklift, etc. To move are available at once
entities from one location to  FREE: Release resource
another
 Static: Do not move virtually
(stay where they are created
during the animation)
 Dynamic: Do not have a
fixed place to stay, move on a
network path
 Path Networks
 Paths of motion for resources
Lecture 10 – Path Networks and Dynamic Resources

 Path Networks  Using Dynamic


 Used to having dynamic Resources
resources move on them  USE, GET, JOINTLY GET
 Entities move themselves are used the same way as
– can be assigned to move in the static resources
on a path network as well  MOVE WITH: gets the
as in move logic available resource, use it
 Types: Passing, non- to move the entity from
passing, and crane one location to another
Lecture 11 – Random Number Generators
 ProModel Distribution Functions  Linear Congruential Method:
 Continuous including  Iterate: Xi+1 = (A*Xi+C) mod M
 Uniform: RAND(X) is uniform [0,x)  A- multiplier
 Uniform: U(a,b), a=mean, b=half-range  Xo – seed (starting point)
 Normal: N(a,b), a=mean, b=standard deviation  C – Increment
 Discrete  M – Modulus (large prime number)
 Binomial: BI(a,b)  Tests for Pseudo Random Numbers
 Geometric: Geo(a)  Uniformity (order doesn’t matter)
 Poisson: P(a), a=mean  Independence (order does matter)
 Stream  Uniformity Test
 A long circular list of ‘random’ numbers  Null: H0: Xi’s ~ U(0,1)
 Numbers picked from list in order  Alternative: H1: Xis not U(0,1)
 Usually numbers are uniform (0,1)  Chi-squared goodness of fit
 How streams affect Simulations?  Kolmogorov Smirov goodness of fit (preferred)
 Outcome 1: The same system seems different  Independence Test
 Outcome 2: The better system seems worse
 Ho: Xis are independent, H1: Xis not
 Random Number independent
 RN streams created by RNG  Alpha=P(type I error) = P(reject H0|H0 is
 RNG ideas true)
 Random time  Alpha is commonly chosen to be 0.1 or 0.05
 Fractional part of square roots of prime numbers
 Two-tallied, alpha is halved
 Pseudo-random number generators
 Chi-squared Goodness of fit
 A good RNG produces RN fast, long cycle,
replicable, repeatable  H0: Ris ~ U(0,1), H1: Ris not U(0,1)
 X0 is called the seed – starting point  Runs test for independence
 H0: Ris are independentt/H1: are not
independent
Lecture 12 – Routing/debugging
 Advanced Routing  Trace
 Locations – Rules  Lists events happening in the
 Processing – Routing – Rule simulation
 ROUTE Statement  Can check “trace” option under
simulation/options to start trace
 Incoming Entities automatically when the simulation
 Oldest by Priority – waiting longest starts
 Random  Debug
 Least available capacity  DEBUG statement brings up
 Last selected location – Oldest by ProModel’s debugger
priority  Step through logic one statement at a
 Highest Attribute value/Lowest time and examine the values of
 Queuing for Output variables and attributes
 No Queuing – entities that have  WAIT UNTIL statement
completed their operations are free to  WAIT UNTIL <condition>
process any routing logic independent  Delays processing for the current
from other entities that have finished block of statements until condition is
their operations true
 FIFO  Can use variables, arrays, location
 LIFO attributes
 By Type
 Cannot use system functions, entity
attributes
 Highest/lowest attribute
Homework 1

 Spaghetti dinner  Events


simulation  Turn on water
 Activities  Turn off water
 Turn on stove
 Fill pan with water
 Water boils
 Heat water
 Add noodles to water
 Cook Noodles
 Turn off stove
 Drain Noodles
 Start draining noodles
 Wait 5 minutes for
noodles to cool  Start eating

 State variables
 Temperature of water,
location of noodles, time
Homework 2
 Q1  Q2 – service station with 3
 IAT: Lookup(Rand(), CDF, Time available spots, FIFO, no spots,
between Arrivals) leave service
 Service Time: Lookup(Rand(),  Entities: Customers
CDF, Service Time)  Attributes: Arrival time, car type,
 Drive in Departure Time: how much money they spend
IF(Drive-in Served = “YES”,  Events: Arrival of customer (A),
MAX(Arrival Time, Sum of departure of a customer (D)
Previous Departure times) +  Activities: Customer being waited,
Service Time, -1) being served
 Drive in served: IF(Arrival Time >  Event Notice
LARGE(Previous Departure
times), “Yes”, “No”)  Event notice (Ai,t): the ith
customer arrived at time t.
 Event notice (Di,t): the ith
customer departed at time t.
 System States:
 LQ(t): customers in queue at the
service station
 LS(t): 1 or 0 indicating worker
being busy or idle.
Homework 3 – ProModel

 Good.
Homework 4
Homework 5 – ProModel

 If pizza is bad more than


twice – throw away
 Attribute: Fail_Pizza
 Variable: GoodPizza
 Move Logic: INC
GoodPizza, INC Fail_Pizza
 RULE: TRM – If
Fail_Times < 2, 1
 Trashcan - if Fail_Times =
2
Homework 6 – ProModel
Homework 6 Continued

Das könnte Ihnen auch gefallen