Example Model
- Model timeShared from Law's
textbook:
- time-shared computer with N terminals
- terminals send jobs with random computing time
- jobs processed by single CPU in time-slices with
round-robin scheduling
- job completed → new job created after random waiting
time
- stops after NJ finished jobs
- outputs average response time, queue length, CPU
utilization
- Transaction-based approach:
- jobs are modeled by entities
- entities have attributes (startTime,
serviceTime)
- implemented as struct variables
- handling of entities with four new atomics
- am_adddata
- adds a set of new attributes to each incoming
entity
- changes non-entity input to entity (conserving
value as attribute)
- am_writedata
- changes value of an entity attribute
- may use values from other attributes
- changing function defined by arbitrary Matlab
command
- am_readdata
- outputs value of an attribute from the input
entity
- am_deletedata
- deletes a set of attributes
- some atomics read parameter from entity attribute
(server, distribute)
- Important new components:
- server with exponentially distributed service times
- coupled model using entities with attribute
tS
![coupled model](../images/bild06.png)
- N-server
- serves up to N incoming entities, each with its
own service time
- atomic with complicated behaviour
- e.g. several concurrent incoming and outgoing
entities
- NSA-DEVS → concurrent outgoing entities
separated by infinitesimal time
- Complete model:
- coupled models for Terminals and CPU straight
forward
- example output