Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

desmoj
Class Transportation  view Transportation download Transportation.java

java.lang.Object
  extended bydesmoj.NamedObject
      extended bydesmoj.ModelComponent
          extended bydesmoj.ProcessCoop
              extended bydesmoj.Transportation

public class Transportation
extends ProcessCoop

Transportation is the object representing the process cooperation between a Transporter process and the goods (products represented by SimProcesses) he is transporting. It is intended that that this Transportation is used with the TransportJunction construct, where a Transporter ( as a master process) is waiting for goods (slave processes) to carry them around in the manufacturing system. During the Transportation the master is active and the slaves are passive. The transportation carried out together is described in the method cooperation, which can be overwritten by the user to build more complex models. Until now this method only models the time it takes to transport the goods. Note: when using the TransportJunction construct the master (Transporter) will be activated after the transportation is done and the slaves will be activated after the master (if they have not been activated during the transportation already).

Version:
DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL

Field Summary
private  desmoj.dist.RealDist transportTimeStream
          The random number stream determining the time it takes to transport the goods.
 
Fields inherited from class desmoj.ModelComponent
 
Fields inherited from class desmoj.NamedObject
 
Constructor Summary
Transportation(Model owner, java.lang.String name, RealDist transportTimeStream, boolean showInTrace)
          Constructs a Transportation process where a master (Transporter) is transporting slaves (SimPorcesses) in a cooperate process.
 
Method Summary
protected  void cooperation(SimProcess master, SimProcess slave)
          The cooperation() method with only one master and one slave is not needed here.
protected  SimTime getTransportTimeSample()
          Returns a SimTime object representing the time it takes to transport the goods with the transporter.
 void setTransportTimeStream(RealDist newTransportTimeStream)
          Sets the transportTimeStream to a new RealDist random number stream.
protected  void transport(SimProcess master, SimProcess slave)
          The transport() method with only one master and one slave is not needed here.
protected  void transport(SimProcess master, SimProcess[] slaves)
          This method describes the transportation process carried out by the master process (some kind of Transporter).
 
Methods inherited from class desmoj.ProcessCoop
activate, activateAfter, activateBefore, getPriority, hold, nextEntity, nextEvent, nextSchedulable, passivate, reActivate, schedule, scheduleAfter, scheduleBefore, setPriority
 
Methods inherited from class desmoj.ModelComponent
current, currentEntity, currentEvent, currentModel, currentSimProcess, currentTime, debugIsOn, debugOff, debugOn, epsilon, getModel, isExperimentCompatible, isModelCompatible, sendDebugNote, sendMessage, sendTraceNote, sendWarning, setOwner, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
 
Methods inherited from class desmoj.NamedObject
getName, getQuotedName, rename, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

transportTimeStream

private desmoj.dist.RealDist transportTimeStream
The random number stream determining the time it takes to transport the goods.

Constructor Detail

Transportation

public Transportation(Model owner,
                      java.lang.String name,
                      RealDist transportTimeStream,
                      boolean showInTrace)
Constructs a Transportation process where a master (Transporter) is transporting slaves (SimPorcesses) in a cooperate process. The time it takes to transport the goods is determined by the specified transportTimeStream.

Method Detail

cooperation

protected void cooperation(SimProcess master,
                           SimProcess slave)
The cooperation() method with only one master and one slave is not needed here. So we pass it to the more general method with an array of slaves as parameter.

Specified by:
cooperation in class ProcessCoop

getTransportTimeSample

protected SimTime getTransportTimeSample()
Returns a SimTime object representing the time it takes to transport the goods with the transporter. The time is taken from the given random number stream transportTimeStream.


setTransportTimeStream

public void setTransportTimeStream(RealDist newTransportTimeStream)
Sets the transportTimeStream to a new RealDist random number stream.


transport

protected void transport(SimProcess master,
                         SimProcess[] slaves)
This method describes the transportation process carried out by the master process (some kind of Transporter). In this simple case only the time it takes to transport the goods is taken into consideration. If the user building the model has to implement a more complex behavior, he has to overwrite this method in a subclass. The time it takes to transport the goods is obtained from the method getTransportTimeSample().


transport

protected void transport(SimProcess master,
                         SimProcess slave)
The transport() method with only one master and one slave is not needed here. So we pass it to the more general method with an array of slaves as parameter.