Chapter 1: What is SimJava?

What is SimJava?

SimJava is a discrete event, process oriented simulation package [1]. As in ref[1] describe that, SimJava is library for simulating system. Each system considered a set of interacting process. Every system is communicating with each other using event and port. And the central system (class) control the whole event execution, port communication, Threads, simulation time and many more. The process of simulation is traced by one file generated during the process.

You can download SimJava Here [2].

SimjavaartchImage 1: Simulation in SimJava by ref[1]

In SimJava entry represented by class sim_entity. This class wrap whole functionality of SimJava. This class describe the behavior of system. We can identify system uniquely bypassing the string parameter to sim_entity class.This is the entry point, as well we are defining port and defining statistical variables for information gathering. Here port is part of communication, here port will have their matching pair. Here Ref[1] note that one port on Lee have one matching pair. But at the reception side pot may have more than one matching pairs. It means that port may have multiple reception. Port are represented by instance of Sim_port class. We need to add this port using add_port() method.


import eduni.simjava.*;              //Import Library
    class Source extends Sim_entity {   //Class with Sim_entity class
       private Sim_port out;          
 
       Source(String name) {
         super(name);               // Call the constructor of Sim_entity
         out = new Sim_port(“Out”); // Create the port
         add_port(out);             // Add the port to the entity
       }
     }

 
Citation
 
[1] http://www.icsa.informatics.ed.ac.uk/research/groups/hase/simjava/guide/tutorial.html#top
[2] http://www.icsa.informatics.ed.ac.uk/research/groups/hase/simjava/simjava.zip

Share Post