B ahasa Si mu lasi Sist im D iskr it .
4.3 B ahasa Si mu lasi Sist im D iskr it .
Alt hough many small as well as large programs for simulat ing discret e sys- t ems have been and being writ t en in general purpose languages , such as FORT RAN, and C , languages designed specially for simulat ing discret e sys- t ems are popular. T hese languages o¤er many convenient facilit ies such as aut omat ic generat ion of st reams of pseudo-random numbers for any desired st at ist ical dist ribut ion; aut omat ic dat a collect ion; t heir st at ist ical analysis and report generat ion; good diagnost ics; aut omat ic handling of queues; et c.
Discret e syst em simulat ion languages are highly pr oblem-orient ed. A language very nat ural and convenient for simulat ing one class of discret e syst em may not be so nat ural for anot her class of syst ems.
Every discr et e syst em simulat ion language must provide t he concept s and st at ement s for
1. represent ing t he st at e of a syst em at a single point in t ime(st at ic mod- eling)
2. moving a syst em from st at e t o st at e (dynamic modeling)
3. performing relevant chores, such as , random number generat ion, dat a analyses, and report generat ion.
Based on t he above point of view , discret e syst em simulat ion languages can be classi… ed int o t hree main cat egories.
² event -orient ed languages ² act ivit y-orient ed languages
4.3.1 Event -or i ent ed languages.
I n an event orient ed language each event is represent ed by an inst ant aneous occurrence in simulat ed t ime and must be scheduled t o occur (in advance) when a proper set of condit ions exist s. The st at e of t he syst em changes at t he occurrence of an event . The language in t his cat egory are used t o model processes t hat are char act erized by a large number of ent it ies. The t wo well known of t his group of languages are SIM SCRI PT and GASP.
4.3.2 A ct i vi t y -or i ent ed l anguages.
I n an act ivity orient ed language t he discret e occurrences are not scheduled in advance. They are creat ed by a program which cont ains descr ipt ions of condit ions under which any act ivit y can t ake place. T hese condit ions are scanned before each simulat ion t ime advance and if all necessary condit ions are met , t he proper act ions are t aken. An act ivity-orient ed language should
be considered for use if t he model has t he following charact erist ics : ² t he model uses a next event or variable t ime increment t ype of t iming
² t he process simulat ed is highly int eract ive but involves a …xed number of ent it ies wit h event s happening irregularly
² event occurrence is cont rolled by cyclic scanning act ivity programs.
An example for t his type of language is CSL .
4.3.3 P rocess-or i ent ed l anguages.
A key feat ure of a pr ocess orient at ion is t hat of a single process rout ine ,com- posed of a number of segment s describing a sequence of act ivit ies. Each seg- ment behaves as an independent ly cont r olled program. On receiving cont rol, only t he st at ement s composing t he segment s are execut ed, and t hen con- t rol is ret urned. Thus t he model is de… ned as a series of occurr ences(called processes) and an example for t his t ype of language is SI MULA.
Transact ion-‡ow orient ed language: Transact ion-‡ow orient ed languages form a subcat egory of process-orient ed languages except t hat t he ‡ow of ac- t ivit ies passes t hrough specially de…ned blocks. The syst em model is repre- sent ed by a ‡ow chart consist ing of t he language blocks. T he program creat es t ransact ions , execut es t hem in t he blocks and moves t hem along t he ‡ow