Jump to content

What is the difference between activity and event in "simulation"?


Recommended Posts

I am studying about components of a system.


It is What entities do to cause changes is activity. It is represented by time period of a specified length.


Event is defined as an instantaneous occurrence that might change state of the system. Endogenous events occurs within the system and exogenous events occurs outside the system.

eg-: making a deposit is an activity, arrival of customer is an exogenous event and completion of service of a customer is an endogenous event.

I don't see any difference between them. making deposits can also be an event as it'll change the state of the system. i.e money in bank account.

The one difference that can be taken from these definitions is "instantaneous" vs "time period' but the examples don't deliver anything about it.

Below is the figure from a slide available online.


Link to comment
Share on other sites


What is the difference between activity and event in "simulation"?

Is this a computer science question?

If yes, in object-orientated programming languages, "customer", "message" will be object of class which you will create for them.

Change of attribute can trigger event.

The activity will be a method of the class that will do something to the object, change attributes and possibly trigger some events.

Events and event-handlers are used to let an unknown class/object learn about changes made to an object.

See how this is implemented in Java:



Event object contains detailful information about the event. e.g. event with information about mouse click will have x and y position of mouse where click occurred and which mouse buttons were clicked or released.


For GUI window, attribute will be opened=false or opened=true, with activity-method open()/close(), with events: opening, opened, closing, closed. User (some class e.g. button, listview, application etc.) of window will add event-handler listening for arriving opened event, or closed event, and do something with this information.

Edited by Sensei
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.