Dual nature of events in discrete simulation

Dual nature of events in discrete simulation

Mathematicsand Computersin Simulation XXV(1983)66-69 North-Holland Publishing Company 66 DUAL NATURE OF EVENTS IN DISCRETE SIMULATION * A. JI\V...

319KB Sizes 3 Downloads 62 Views

Mathematicsand Computersin Simulation XXV(1983)66-69 North-Holland Publishing Company

66

DUAL NATURE

OF EVENTS

IN DISCRETE

SIMULATION

*

A. JI\VOR Central Research Institute for Physm

of the Hungarian Acdeng

of Soencrr.Budupest, Hungq

The problem caused by the representation of different types of events in discrete simulation is discussed and a solution based on their dual nature is presented. 1. INTRODUCTION The dynamic behaviour of discrete models is characterized by changes taking place at discrete time values and the changes themselves take place between the possible discrete values of the state variables. These values may represent a large variety of things depending on the problem to be simulated. At first glance the difference is hidden since it seems that a customer arriving in a queue or a level in a digital logic system can both be represented by numbers in the computer. Problems are, however, encountered in special situations which are - in most cases - not too qenera1 but which might cause trouble. To be more specific these cases are the hazardous, indeterminate or race conditions. Let us consider, as an example, a store of goods that is filled from a source and emptied by a customer. Let us suppose that the storage facility is near its empty state in which case simultaneously arriving demand and refilling can either result in the fulfillment of the demand if the subroutine of "filling" is the first to be called or the demand cannot be fulfilled. A similar situation may arise if a single resource is requested simultaneously by two users. These may reflect two sorts of problems (a) That parallel processes are executed in a sequential machine (b) That in reality practically simultaneous processes may result in different outcomes according to differentially small time differences in their occurrence. 2. THE PROBLEMS

POSED BY REAL SYSTEMS

Hamming states that "The purpose of computing is insight, not numbers" Ill. There are times when simulation is aimed at the understanding i.e. the investiga-

tion of the operation of the system, i.e. how it works or whether it works as expected. This is the situation, for example, in the gate level logic simulation of computers or other digital logic networks, where the purpose is to verify whether the system works as the designer intended [a]. As a result this field has initiated the call for methods taking care of this sort of problem [2][3] i.e. transient uncertainties, hazards, etc. Another end to achieve by using simulation is to investigate the effectivity of the systems. Here the simulation experiment is intended to determine the throughput efficiency, response time and other such - statistical - parameters. There are, however, cases when - under certain conditions - malfunctioning of the system can occur. The simultaneous demand for a facility may also result in an "after you, after you" situation that causes the system to be stuck at a certain condition. Let us take urban traffic. The models of this kind are mainly interested in statistical data. How to increase the throughputs of crossings, streets, etc. by controlling traffic lights and other means of control. But let us take the very simple case (see Figure 1) of a crossing with four cars arriving simultaneously from four directions. Assuming the rule that the car from the right side has right of way; the given situation produces a stuck condition, i.e. "after you, after you" situation. The other possibility would be that the situation is resolved arbitrarily and this results (in reality as well) in a hazardous situation. What would be required from a simulation model? Firstly that the situation should be solved by imitating reality (i.e. the cars will not be stopped for eternity), but it would also be highly advantageous to provide some sort of signalization that a special hazardous situation has

* Thispaper is a longer version of a paper Originally pl’esented at the 10thIMACS Congress, Montreal. 1982. 037%4754/83/0000~0000/$03.00

0 1983 IMACS/North-Holland

A. J&or

/ Dual nature of eoents in discrete stmulation

occured. This would on the one hand give a realistic picture of the traffic and on the other hand signalize a very important additional parameter, i.e. the situations where the danger of accidents is high.

61

self causes such an event. This is simple since this has to be incorporated in its algorithm. The other case is when the interconnection of elements may cause such an event due to feedback loops. This case is solved by analysing the network topology determining the connected feedback loop systems prior to the dynamic simulation run and attaching special algorithms at run time [2]. y/ In the last step we generalize the method. Firstly let us consider the events that occur in discrete systems. The first category has one thing in common, viz. that they can be characterized as entities like the transactions in GPSS meaning that they are objects moving from one place to the other. The second category may be represented as levels (such as a semaphor of the railway, a digital signal etc.).

Figure

1 4. THE CONCEPT

3. THE PROPOSED

Let us deal with the problem in the following steps a/ Assuming that our model consists of a network of interconnected modules having outputs (y); inputs (x) and internal algorithms and states (9).

~1 Let us shortly introduce the state description method obtained for the handling of systems that are described by "level type" state variables (similarly to digital logic systems). In this way a description for quasideterministic systems [4] can be obtained. The proposed solution utilizes a three component vector description for describing the states, inputs and outputs, in a way like

s = &Is

I

OF THE DUAL NATURE

SOLUTIONS

qIFO’

clISO}

(I)

where denotes the deterministic value of S the parameter, IF0 means the Indeterminacy of First Order, i.e. the presence of a transient state qi+gj that has to be modelled in its entirety according to the three valued logic description, IS0 is the descriptor for Indeterminacy of Second Order meaning that the value is in a state that is in a given subset of possible states but it cannot be known exactly which. Modellinq is undertaken in a way that if an IS0 occurs the system (or subsystem in question) is forced in one of the possible deterministic states and an IS0 is signalized simultaneously. There are two cases causing such events. The first one is when an element on it-

Indeterminacies can be treated in systems where "level type" event description is used. What is needed is; the handling of such systems whose behaviour can be represented by the movement of entities thus enabling a means of representing a situation when an entity is in transition between two blocks of the system (it is here and thelqe simultaneously), or the describing of such transitions where the entity is here or but it is not certain which of the there two (or more) possibilities exist (see Figure 2). We have to note that in a number of cases a simple random choice in itself is not sufficient! The situation has to be signalized as in the case of the traffic example. Our problem can be solved using the dual nature of events in entity type representation t51, meaning that a level type equivalent can always be found for substitution and then the procedure mentioned in B can be applied.

b/ Figure

2

Our basic idea can be formulated as follows. A connection in an entity type

68

A. Jdoor / Dual nature

of eventsin discrete

network of an entity emitting donor (D) and receiving acceptor (A) part is equivalent to a pair of level type input (1) and output (0) points (see Figure 3). If there is an active donor - passive acceptor (D,Ap) pair; the donor intends to transfer an entity and the acceptor signalizes back its readiness to accept. In the other case (D A,), the acceptor tries to get an enti,'5. y and the donor's response shows whether it is capable of giving one.

simulation

great benefit tical cases.

in a large number of prac-

2

1

3

A@D

@D

al

bl

Figure

3

In Figure 4/a simple serially connected single storage cell element chain is shown. Assuming that they all intend to transfer the entities they contain simultaneously different things may happen depending on the sequence of their activation in the program or the differential deviations in their activations in reality. If the sequence is, for example, 1,2,3, the situation in Figure 4/b is obtained if it is 2,1,3, then it is Figure 4/c. At first glance one may think that such a hazardous situation may be a special subject matter phenomenon in such a straight "feedback-loop-free" network, but the transformations according to Figure 4/d, and more obviously depicted in Figure 4/e, show clearly the presence of the hidden feedback loopsystern. Another example of hazardous race conditions where two units intend to transfer simultaneously to a third is shown in Figure 5/a. Again the transformation and redrawing according to Figure 5/b and c show that the three units form a connected feedback loopsystem.

0 I

I 0

5. SOME EXAMPLES OF PROBLEM SOLUTIONS BASED ON THE DUALITY CONCEPT

I 0

dl

el Figure 4

53 A

A

lzla

al IO

01

c!Ys-Ts 01

IO

bl

Lastly an important practical problem of digital logic simulation which seems to be an entirely pure "level type" network. The simulation of MOS LSI networks has posed the problem of modellinq networks with bidirectional tristate transfer gates [6] having dynamic storage capacity at their outputs. If their gate is open the conditions of their ends determine which way the propagation of information will take place. These networks consist actually of switched capacitors. Their simplified discrete model is of

El 0

0

I

I

0 I

0 I

cl

Figure

5

69

i

u2_&$z-lu 1

I

C2

El I

c2>c1 Q,

=Q2

(C, -C2) (Q=C*U,

Figure Our approach can give here a clear solution. We just have to realize that in such networks the voltage representing the logical level is a secondary phenomThe primary process is that of the enon. transfer of charges! If we simplify our model to a given number of discrete values of capacitors (storage cells) and charge quantities (particles) we get an entity type network; this will be a natural description of the operation of the model from which the level type logic values can be obtained simply (see Figure 6) and - due to our uniform treatment - these network segments can be fitted to the rest of the level type network. 6. CONCLUSIONS It seems that with the considerations and the given methodology a useful tool for describing anomalies of entity type networks can be achieved and the universal treatment helps to a better understanding of the state representations in discrete simulation. 7. REFERENCES

[I I Hamming, R.V., Numerical Methods Scientists and Engineers, Hill, New York, 1962).

[II

for (McGraw-

Jdvor, A., BenkB, T.ne, Simulation of Discrete Systems, (Miiszaki Konyvkiado, Budapest, 1979) (In Hungarian)

[31 Breuer,

M.A., A Note on Three Valued Logic Simulation, IEEE Trans. on Computers, Vol C-21. No 4. Apr. (1972) 399-402.

[41 Jdvor,

A., An Approach to the Modelling of Uncertainties in the Simula-

6 tion of Quasideterministic Discrete Event Systems, Problems of Control and Information Theory 4(3) (1975) 219-229. 151 Javor,

A., Proposals on the Structure of Simulation Systems, in Javor, A. (ea.), Discrete Simulation‘ and Related Fields, (North-Holland) (to be published) 9-18.

[61

Javor, A., Keresztes, P., Benkd, M., A Solution for MOS-LSI Gate Level Simulation, Simulation of Systems IMACS Congress 1979 Sorrento, September 24-28 1979 (North-Holland, Amsterdam) 365-374.