|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcz.zcu.fav.kiv.jsim.JSimSimulation
cz.zcu.fav.kiv.cs.CSSimulation
The main class describing the simulation submodel.
| Field Summary |
| Fields inherited from class cz.zcu.fav.kiv.jsim.JSimSimulation |
calendar, MODE_GUI_BATCH, MODE_GUI_INTERACTIVE, MODE_TXT, NEW_PROCESS_FORBIDDEN, NEW_QUEUE_FORBIDDEN, NEW_SEMAPHORE_FORBIDDEN, PRN_ERROR, PRN_MESSAGE, SIMULATION_IN_PROGRESS, SIMULATION_NOT_STARTED, SIMULATION_TERMINATED, time |
| Constructor Summary | |
CSSimulation(java.lang.String name,
int mode,
double whenUpdate,
java.lang.String host,
int port)
Creates a new class representing the simulation submodel. |
|
CSSimulation(java.lang.String name,
int mode,
java.lang.String host,
int port)
Creates a new class representing the simulation submodel. |
|
CSSimulation(java.lang.String name,
java.lang.String host,
int port)
Creates a new class representing the simulation submodel. |
|
| Method Summary | |
int |
getInternalProcID(int who)
Returns the ID assigned by submodel of process specified by ID assigned by user. |
CSCalendarEvent |
getNextCEForMe(int ID)
Returns the event for the next execution of the specified process in this step of the distributed simulation. |
int |
getNextFromWhoForMe(int ID)
Returns the ID of the neighbour who has scheduled the next execution of the specified process in this step of the distributed simulation. |
java.lang.String |
getNextMessageForMe(int ID)
Returns the message for the next execution of the specified process in this step of the distributed simulation. |
double |
getNextTimeForMe(int ID)
Returns the time of next execution of the specified process in this step of the distributed simulation. |
boolean |
isInternal(int ID)
True, if a process with specified ID is located in this submodel. |
void |
simulate(double maxTime)
Executes the simulation. |
boolean |
somethingForMe(int ID)
Returns true, if there is some event for the specified process in this step of the distributed simulation. |
| Methods inherited from class cz.zcu.fav.kiv.jsim.JSimSimulation |
addEntryToCalendar, addProcess, addQueue, addSemaphore, deleteEntriesInCalendar, deleteProcess, error, getCurrentTime, getFreeProcessNumber, getFreeQueueNumber, getFreeSemaphoreNumber, getGraphicLock, getChange, getName, getNumber, getNumberOfProcesses, getNumberOfQueues, getNumberOfSemaphores, getObjectsToBeDisplayed, getRunningProcess, getSimulationMode, getSimulationState, getStepLock, getTalking, getTalkStream, getWaitingForWindowClosure, getWindowClosureLock, changeTalkStream, isRunningGUI, message, messageNoNL, printString, runGUI, setTalking, shutdown, step, switchToNobody, talk, talk, talk, talk, talk, talk, talk, talk, talk, waitForWindowClosure, windowIsClosing |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CSSimulation(java.lang.String name,
java.lang.String host,
int port)
throws cz.zcu.fav.kiv.jsim.JSimInvalidParametersException
name - String The name of this submodel.host - String The address of the server.port - int The port is the server connected to.
public CSSimulation(java.lang.String name,
int mode,
java.lang.String host,
int port)
throws cz.zcu.fav.kiv.jsim.JSimInvalidParametersException
name - String The name of this submodel.mode - int The simulation mode. Possible values are JSimSimulation.MODE_TXT, JSimSimulation.MODE_GUI_BATCH.host - String The address of the server.port - int The port is the server connected to.
public CSSimulation(java.lang.String name,
int mode,
double whenUpdate,
java.lang.String host,
int port)
throws cz.zcu.fav.kiv.jsim.JSimInvalidParametersException
name - String The name of this submodel.mode - int The simulation mode. Possible values are JSimSimulation.MODE_TXT, JSimSimulation.MODE_GUI_BATCH.whenUpdate - double A simulation time interval after which the GUI output will be updated.host - String The address of the server.port - int The port is the server connected to.| Method Detail |
public final void simulate(double maxTime)
throws CSRemoteException,
cz.zcu.fav.kiv.jsim.JSimMethodNotSupportedException,
cz.zcu.fav.kiv.jsim.JSimTooManyProcessesException,
cz.zcu.fav.kiv.jsim.JSimInvalidParametersException,
cz.zcu.fav.kiv.jsim.JSimSimulationAlreadyTerminatedException,
cz.zcu.fav.kiv.jsim.JSimSecurityException
maxTime - double The simulation time till the user wish to simulate.
CSRemoteException - Means failure of other submodel.
cz.zcu.fav.kiv.jsim.JSimMethodNotSupportedException
cz.zcu.fav.kiv.jsim.JSimTooManyProcessesException
cz.zcu.fav.kiv.jsim.JSimInvalidParametersException
cz.zcu.fav.kiv.jsim.JSimSimulationAlreadyTerminatedException
cz.zcu.fav.kiv.jsim.JSimSecurityExceptionpublic final boolean isInternal(int ID)
public final int getInternalProcID(int who)
who - int ID assigned by user.
public final boolean somethingForMe(int ID)
ID - int Local ID assigned by submodel.public final double getNextTimeForMe(int ID)
ID - int Local ID assigned by submodel.public final java.lang.String getNextMessageForMe(int ID)
ID - int Local ID assigned by submodel.public final int getNextFromWhoForMe(int ID)
ID - int Local ID assigned by submodel.public final CSCalendarEvent getNextCEForMe(int ID)
ID - int Local ID assigned by submodel.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||