Skip to content
Snippets Groups Projects
Commit df8ee500 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

refactor package name for clarity

parent 4d8f6dd1
No related branches found
No related tags found
No related merge requests found
Showing
with 873 additions and 0 deletions
package SimkitOpenDis7Examples;
import simkit.SimEntityBase;
import simkit.random.RandomVariate;
/**
* One of the simplest non-trivial Event Graph models. A series of Arrival
* events is scheduled based on an inter arrival time random variate. The state
* variable, simply counts the number of these arrivals.
*
* @author ahbuss
*/
public class ArrivalProcess extends SimEntityBase {
/**
* Generates interarrival times
*/
private RandomVariate interarrivalTimeGenerator;
/**
* State variable that counts the number of Arrival events
*/
protected int numberArrivals;
/**
* Instantiate an ArrivalProcess with the given interarrivalTimeGenerator
*
* @param interarrivalTimeGenerator Given RandomVariate for interarrival
* times
*/
public ArrivalProcess(RandomVariate interarrivalTimeGenerator) {
this.setInterarrivalTimeGenerator(interarrivalTimeGenerator);
}
/**
* If the ArrivalProcess is instantiated using the zero-argument
* constructor, be sure the set the interarrivalTimeGenerator with an
* explicit call to its setter method.
*/
public ArrivalProcess() {
}
/**
* Initialize numberArrivals to 0
*/
public void reset() {
super.reset();
numberArrivals = 0;
}
/**
* Schedule the first Arrival event with delay generated by
* interarrivalTimeGenerator
*/
public void doRun() {
firePropertyChange("numberArrivals", getNumberArrivals());
waitDelay("Arrival", interarrivalTimeGenerator);
}
/**
* Increment numberArrivals<br>
* Schedule next Arrival event with delay generated by
* interarrivalTimeGenerator
*/
public void doArrival() {
int oldNumberArrivals = getNumberArrivals();
numberArrivals += 1;
firePropertyChange("numberArrivals", oldNumberArrivals, getNumberArrivals());
waitDelay("Arrival", interarrivalTimeGenerator);
}
/**
* @return the interarrivalTimeGenerator
*/
public RandomVariate getInterarrivalTimeGenerator() {
return interarrivalTimeGenerator;
}
/**
* @param interarrivalTimeGenerator the interarrivalTimeGenerator to set
*/
public void setInterarrivalTimeGenerator(RandomVariate interarrivalTimeGenerator) {
this.interarrivalTimeGenerator = interarrivalTimeGenerator;
}
/**
* @return the numberArrivals
*/
public int getNumberArrivals() {
return numberArrivals;
}
}
# Simkit DIS Examples
This directory includes simple Simkit programs which are getting modified to
utilize opendis7-java libraries for PDU output.
## Design Goals
* Orient DIS code to share state changes from Simkit entities.
* Establish reference examples with corresponding output logs for test confirmation.
* Build interoperability mechanisms for distributed simulation in MOVES.
## References
* https://github.com/ahbuss/Simkit
* https://gitlab.nps.edu/abuss/MV3302ClassCode
## SimkitExamples
a. SimpleServer
* [SimpleServer.java](SimpleServer.java)
* [run.RunSimpleServer.java](run/RunSimpleServer.java) and [run.RunSimpleServerLog.txt](run/RunSimpleServerLog.txt)
b. Two Crane Berths
* [ArrivalProcess.java](ArrivalProcess.java)
* [Ship.java](Ship.java)
* [ShipArrivalProcess.java](ShipArrivalProcess.java)
* [TwoCraneBerths.java](TwoCraneBerths.java)
* [run.RunTwoCranesBerth.java](run/RunTwoCranesBerth.java) and [run.RunTwoCranesBerthLog.txt](run/RunTwoCranesBerthLog.txt)
package SimkitOpenDis7Examples;
import simkit.Entity;
/**
* @author ahbuss
*/
public class Ship extends Entity {
/**
* Remaining time to unload ship at unit rate
*/
protected double remainingUnloadingTime;
/**
*
* @throws IllegalArgumentException if remainingUnloadingTime &le; 0.0
* @param remainingUnloadingTime Given initial unloading time
*/
public Ship(double remainingUnloadingTime) {
super("Ship");
if (remainingUnloadingTime <= 0.0) {
throw new IllegalArgumentException(
"remainingUnloadingTime must be > 0.0: "
+ remainingUnloadingTime);
}
this.remainingUnloadingTime = remainingUnloadingTime;
}
/**
* Decrement remainingUnloadingTime by the elapsed time at the given rate
*
* @param rate Given rate of unloading
*/
public void work(double rate) {
remainingUnloadingTime -= getElapsedTime() * rate;
}
/**
*
* @return The remainingUnloadingTime
*/
public double getRemainingUnloadingTime() {
return remainingUnloadingTime;
}
@Override
public String toString() {
return super.toString() + String.format(" %.3f", getRemainingUnloadingTime());
}
}
package SimkitOpenDis7Examples;
import simkit.random.RandomVariate;
/**
* @author ahbuss
*/
public class ShipArrivalProcess extends ArrivalProcess {
/**
* Generates the initial unloading times for the Ships
*/
private RandomVariate unloadTimeGenerator;
/**
* Zero-argument constructor
*/
public ShipArrivalProcess() {
}
/**
*
* @param interarrivalTimeGenerator Given generator for interarrival times
* @param unloadTimeGenerator Given generator for total unloading times
*/
public ShipArrivalProcess(
RandomVariate interarrivalTimeGenerator,
RandomVariate unloadTimeGenerator) {
this();
this.setInterarrivalTimeGenerator(interarrivalTimeGenerator);
this.setUnloadTimeGenerator(unloadTimeGenerator);
}
/**
* Instantiate a new Ship and Schedule Arrival(Ship)
*/
@Override
public void doArrival() {
super.doArrival();
Ship ship = new Ship(unloadTimeGenerator.generate());
waitDelay("Arrival", 0.0, ship);
}
/**
* @return the unloadTimeGenerator
*/
public RandomVariate getUnloadTimeGenerator() {
return unloadTimeGenerator;
}
/**
* @param unloadTimeGenerator the unloadTimeGenerator to set
*/
public void setUnloadTimeGenerator(RandomVariate unloadTimeGenerator) {
this.unloadTimeGenerator = unloadTimeGenerator;
}
}
package SimkitOpenDis7Examples;
import simkit.Priority;
import simkit.SimEntityBase;
import simkit.random.RandomVariate;
/**
* Simple Server component. Instances of this class cannot be used on their own,
* but require another SimEntity to schedule Arrival events. If it is desired to
* listen to an event of another name,use an Adapter instance.
*
* The StartService is schedule with a positive priority, which will ensure it
* will occur ahead of any simultaneously scheduled Arrival events, as long as
* they have the default priority of 0.0.
*
* @author ahbuss
*/
public class SimpleServer extends SimEntityBase {
/**
* Total number of servers
*/
private int totalNumberServers;
/**
* Generates service times
*/
private RandomVariate serviceTimeGenerator;
/**
* number of available servers at any time
*/
protected int numberAvailableServers;
/**
* number in queue at any time
*/
protected int numberInQueue;
/**
* Number customers served
*/
protected int numberServed;
/**
* Zero-argument constructor
*/
public SimpleServer() {
}
/**
* Creates a new instance of SimpleServer with the given parameters
*
* @param totalNumberServers Total number of servers
* @param serviceTimeGenerator Service time generator. Must be RandomVariate
* instance that only generates non-negative values.
*/
public SimpleServer(int totalNumberServers, RandomVariate serviceTimeGenerator) {
setTotalNumberServers(totalNumberServers);
setServiceTimeGenerator(serviceTimeGenerator);
}
/**
* Set numberAvailable servers to total number servers, numberInQueue to 0,
* numberServed to 0.
*/
@Override
public void reset() {
super.reset();
numberInQueue = 0;
numberAvailableServers = totalNumberServers;
numberServed = 0;
}
/**
* Just fires PropertyChange events
*/
public void doRun() {
firePropertyChange("numberInQueue", getNumberInQueue());
firePropertyChange("numberAvailableServers", getNumberAvailableServers());
firePropertyChange("numberServed", getNumberServed());
}
/**
* Increment number in queue. If a server is available, schedule
* StartService immediately with priority of 1.0
*/
public void doArrival() {
int oldNumberInQueue = numberInQueue;
numberInQueue = numberInQueue + 1;
firePropertyChange("numberInQueue", oldNumberInQueue, getNumberInQueue());
if (getNumberAvailableServers() > 0) {
waitDelay("StartService", 0.0, Priority.HIGH);
}
}
/**
* Decrement numberInQueue and numberAvailableServers Schedule EndService
* after service time delay
*/
public void doStartService() {
int oldNumberInQueue = numberInQueue;
numberInQueue = numberInQueue - 1;
firePropertyChange("numberInQueue", oldNumberInQueue, numberInQueue);
int oldNumberAvailableServers = numberAvailableServers;
numberAvailableServers = numberAvailableServers - 1;
firePropertyChange("numberAvailableServers", oldNumberAvailableServers, numberAvailableServers);
// double serviceTime = getServiceTimeGenerator().generate();
// firePropertyChange("serviceTime", serviceTime);
waitDelay("EndService", serviceTimeGenerator);
}
/**
* Increment numberAvailableServers If customers in queue, schedule
* StartService immediately with HIGH priority
*/
public void doEndService() {
int oldNumberAvailableServers = numberAvailableServers;
numberAvailableServers = numberAvailableServers + 1;
firePropertyChange("numberAvailableServers", oldNumberAvailableServers, numberAvailableServers);
int oldNumberServed = numberServed;
numberServed = numberServed + 1;
firePropertyChange("numberServed", oldNumberServed, numberServed);
if (getNumberInQueue() > 0) {
waitDelay("StartService", 0.0, Priority.HIGH);
}
}
/**
*
* @return the numberAvailableServers
*/
public int getNumberAvailableServers() {
return numberAvailableServers;
}
/**
*
* @return the numberInQueue
*/
public int getNumberInQueue() {
return numberInQueue;
}
/**
*
* @param totalNumberServers total number of servers
* @throws IllegalArgumentException if totalNumberServers &lt; 0
*/
public void setTotalNumberServers(int totalNumberServers) {
if (totalNumberServers <= 0) {
throw new IllegalArgumentException("Need positive number of servers: " + totalNumberServers);
}
this.totalNumberServers = totalNumberServers;
}
/**
* @return the serviceTimeGenerator
*/
public RandomVariate getServiceTimeGenerator() {
return this.serviceTimeGenerator;
}
/**
* @param serviceTimeGenerator the serviceTimeGenerator to set
*/
public void setServiceTimeGenerator(RandomVariate serviceTimeGenerator) {
this.serviceTimeGenerator = serviceTimeGenerator;
}
/**
*
* @return the totalNumberServers
*/
public int getTotalNumberServers() {
return this.totalNumberServers;
}
/**
*
* @return the numberServed
*/
public int getNumberServed() {
return this.numberServed;
}
}
package SimkitOpenDis7Examples;
import java.util.SortedSet;
import java.util.TreeSet;
import simkit.Priority;
import simkit.SimEntityBase;
/**
* @author ahbuss
*/
public class TwoCraneBerths extends SimEntityBase {
/**
* Queue of Ships waiting to go into the berth
*/
protected SortedSet<Ship> queue;
/**
* Contains 0, 1, or two Ships being unloaded
*/
protected SortedSet<Ship> berth;
/**
* Time in the system for each Ship
*/
protected double timeInSystem;
/**
* Delay in the queue for each Ship
*/
protected double delayInQueue;
/**
* Instantiate queue and berth containers
*/
public TwoCraneBerths() {
this.queue = new TreeSet<>();
this.berth = new TreeSet<>();
}
/**
* Clear queue and berth containers
*/
@Override
public void reset() {
super.reset();
queue.clear();
berth.clear();
timeInSystem = Double.NaN;
delayInQueue = Double.NaN;
}
/**
* Only PropertyChangeEvents
*/
public void doRun() {
firePropertyChange("queue", getQueue());
firePropertyChange("berth", getBerth());
firePropertyChange("timeInSystem", getTimeInSystem());
firePropertyChange("delayInQueue", getDelayInQueue());
}
/**
* Add the given Ship to queue<br>
* If berths is empty, schedule StartUnloadingTwoCranes<br>
* If berths has 1 Ship, schedule SwitchToOneCrane
*
* @param ship Given Ship arriving to harbor
*/
public void doArrival(Ship ship) {
ship.stampTime();
SortedSet<Ship> oldQueue = getQueue();
queue.add(ship);
firePropertyChange("queue", oldQueue, getQueue());
if (berth.isEmpty()) {
waitDelay("StartUnloadingTwoCranes", 0.0, Priority.HIGH);
}
if (berth.size() == 1) {
waitDelay("SwitchToOneCrane", 0.0);
}
}
/**
* Remove the first Ship from queue<br>
* DelayInQueue is elapsedTime of that Ship<br>
* Add the ship to berth container<br>
* Schedule EndUnloadingTwoCranes at half the remaining time
*/
public void doStartUnloadingTwoCranes() {
SortedSet<Ship> oldQueue = getQueue();
Ship ship = queue.first();
queue.remove(ship);
firePropertyChange("queue", oldQueue, getQueue());
delayInQueue = ship.getElapsedTime();
firePropertyChange("delayInQueue", getDelayInQueue());
ship.stampTime();
SortedSet<Ship> oldBerth = getBerth();
berth.add(ship);
firePropertyChange("berth", oldBerth, getBerth());
waitDelay("EndUnloadingTwoCranes", 0.5 * ship.getRemainingUnloadingTime());
}
/**
* Remove the (one) Ship from berth<br>
* TimeInSystem is the age of the Ship
*/
public void doEndUnloadingTwoCranes() {
SortedSet<Ship> oldBerth = getBerth();
Ship ship = berth.first();
berth.remove(ship);
firePropertyChange("berth", oldBerth, getBerth());
timeInSystem = ship.getAge();
firePropertyChange("timeInSystem", getTimeInSystem());
}
/**
* This event is when a Ship arrives to find only one other Ship being
* unloaded.<br>
* Credit the ship in the berth with work at a rate of 2 (since 2 cranes
* have been unloading it<br>
* Interrupt EndUnloadingTwoCranes<br>
* Schedule EndUnloadingOneCrane with the Ship already in the berth<br>
* Schedule StartUnloadingOneCrane
*/
public void doSwitchToOneCrane() {
Ship ship = berth.first();
ship.work(2.0);
ship.stampTime();
interrupt("EndUnloadingTwoCranes");
waitDelay("EndUnloadingOneCrane", ship.getRemainingUnloadingTime(), ship);
waitDelay("StartUnloadingOneCrane", 0.0, Priority.HIGH);
}
/**
* Pop the first Ship from the queue<br>
* delayInQueue is elapsedTime (from Arrival event)<br>
* Add that Ship to berth container<br>
* Schedule EndUnloadingOneCrane with that Ship
*/
public void doStartUnloadingOneCrane() {
SortedSet<Ship> oldQueue = getQueue();
Ship ship = queue.first();
queue.remove(ship);
firePropertyChange("queue", oldQueue, getQueue());
delayInQueue = ship.getElapsedTime();
firePropertyChange("delayInQueue", getDelayInQueue());
ship.stampTime();
SortedSet<Ship> oldBerth = getBerth();
berth.add(ship);
firePropertyChange("berth", oldBerth, getBerth());
waitDelay("EndUnloadingOneCrane", ship.getRemainingUnloadingTime(), ship);
}
/**
* Remove given Ship from berth<br>
* If Ships in queue, schedule StartUnloadingOneCrane<br>
* If queue is empty, schedule SwitchToTwoCranes<br>
* timeInSystem is age of Ship
*
* @param ship Given Ship
*/
public void doEndUnloadingOneCrane(Ship ship) {
SortedSet<Ship> oldBerth = getBerth();
berth.remove(ship);
firePropertyChange("berth", oldBerth, getBerth());
if (queue.size() > 0) {
waitDelay("StartUnloadingOneCrane", 0.0, Priority.HIGH);
}
if (queue.isEmpty() && berth.size() == 1) {
waitDelay("SwitchToTwoCranes", 0.0);
}
timeInSystem = ship.getAge();
firePropertyChange("timeInSystem", getTimeInSystem());
}
/**
* Credit the work of the remaining Ship in berth at unit rate<br>
* Interrupt EndUnloadingOneCrane<br>
* Schedule EndUnloadingTwoCranes at double the rate (i.e., half the remaining time)
*/
public void doSwitchToTwoCranes() {
Ship ship = berth.first();
ship.work(1.0);
ship.stampTime();
interrupt("EndUnloadingOneCrane", ship);
waitDelay("EndUnloadingTwoCranes",
0.5 * ship.getRemainingUnloadingTime());
}
/**
*
* @return Shallow copy of queue
*/
public SortedSet<Ship> getQueue() {
return new TreeSet<>(queue);
}
/**
*
* @return Shallow copy of berth
*/
public SortedSet<Ship> getBerth() {
return new TreeSet<>(berth);
}
/**
*
* @return The timeInSystem
*/
public double getTimeInSystem() {
return timeInSystem;
}
/**
*
* @return The delayInQueue
*/
public double getDelayInQueue() {
return delayInQueue;
}
}
File added
File added
File added
package SimkitOpenDis7Examples.run;
import SimkitOpenDis7Examples.ArrivalProcess;
import SimkitOpenDis7Examples.SimpleServer;
import simkit.Schedule;
import simkit.random.RandomVariate;
import simkit.random.RandomVariateFactory;
import simkit.stat.SimpleStatsTimeVarying;
import simkit.util.SimplePropertyDumper;
/**
* <h2>Output:</h2><pre>
* ArrivalProcess.1
* &nbsp;&nbsp;&nbsp;&nbsp;interarrivalTimeGenerator = Uniform (0.900, 2.200)
* SimpleServer.2
* &nbsp;&nbsp;&nbsp;&nbsp;serviceTimeGenerator = Gamma (1.700, 1.800)
* &nbsp;&nbsp;&nbsp;&nbsp;totalNumberServers = 2
* Simulation ended at time 100,000.000
*
* There have been 64,475 arrivals
* There have been 64,472 customers served
* Average number in queue 15.9655
* Average utilization 0.9819</pre>
*
* @author ahbuss
*/
public class RunSimpleServer {
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
String rvName = "Uniform";
double lower = 0.9;
double upper = 2.2;
RandomVariate interarrivalTimeGenerator = RandomVariateFactory.getInstance(rvName, lower, upper);
ArrivalProcess arrival = new ArrivalProcess(interarrivalTimeGenerator);
rvName = "Gamma";
double alpha = 1.7;
double beta = 1.8;
RandomVariate serviceTimeGenerator = RandomVariateFactory.getInstance(rvName, alpha, beta);
int numServ = 2;
SimpleServer server = new SimpleServer(numServ, serviceTimeGenerator);
arrival.addSimEventListener(server);
SimplePropertyDumper simplePropertyDumper = new SimplePropertyDumper();
// server.addPropertyChangeListener(simplePropertyDumper);
// arrival.addPropertyChangeListener(simplePropertyDumper);
SimpleStatsTimeVarying numberInQueueStat = new SimpleStatsTimeVarying("numberInQueue");
SimpleStatsTimeVarying numberAvailableServersStat = new SimpleStatsTimeVarying("numberAvailableServers");
server.addPropertyChangeListener(numberInQueueStat);
server.addPropertyChangeListener(numberAvailableServersStat);
System.out.println(arrival);
System.out.println(server);
// Schedule.setVerbose(true);
// Schedule.setSingleStep(false);
// double stopTime = 6.0;
double stopTime = 100000.0;
Schedule.stopAtTime(stopTime);
Schedule.reset();
numberInQueueStat.reset();
numberAvailableServersStat.reset();
Schedule.startSimulation();
System.out.printf("Simulation ended at time %,.3f%n", Schedule.getSimTime());
System.out.printf("%nThere have been %,d arrivals%n", arrival.getNumberArrivals());
System.out.printf("There have been %,d customers served%n", server.getNumberServed());
System.out.printf("Average number in queue\t%.4f%n", numberInQueueStat.getMean());
System.out.printf("Average utilization\t%.4f%n", 1.0 - numberAvailableServersStat.getMean() / server.getTotalNumberServers());
}
}
ant -f C:\\x-nps-gitlab\\NetworkedGraphicsMV3500\\examples -Dnb.internal.action.name=run.single -Djavac.includes=SimkitExamples/run/RunSimpleServer.java -Drun.class=SimkitExamples.run.RunSimpleServer run-single
init:
Deleting: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\built-jar.properties
deps-jar:
Updating property file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\built-jar.properties
Compiling 1 source file to C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\classes
compile-single:
run-single:
ArrivalProcess.1
interarrivalTimeGenerator = Uniform (0.900, 2.200)
SimpleServer.2
totalNumberServers = 2
serviceTimeGenerator = Gamma (1.700, 1.800)
Simulation ended at time 100,000.000
There have been 64,475 arrivals
There have been 64,472 customers served
Average number in queue 15.9655
Average utilization 0.9819
BUILD SUCCESSFUL (total time: 3 seconds)
package SimkitOpenDis7Examples.run;
import SimkitOpenDis7Examples.ShipArrivalProcess;
import SimkitOpenDis7Examples.TwoCraneBerths;
import simkit.Schedule;
import simkit.random.RandomVariate;
import simkit.random.RandomVariateFactory;
import simkit.stat.CollectionSizeTimeVaryingStats;
import simkit.stat.SimpleStatsTally;
/**
* Run simple two-berth model for 10 years (3650 days).
* <h2>Output:</h2><pre>
ShipArrivalProcess.1
unloadTimeGenerator = Uniform (0.500, 1.500)
interarrivalTimeGenerator = Exponential (0.700)
TwoCraneBerths.2
Simulation ended at time 3,650.0
Number of ships arriving: 5,135
Number of ships unloaded: 5,129
Maximum # in queue: 11
Average # in queue: 0.6834
Average # busy berths: 1.1737
Average time in system: 1.3207
Average delay in queue: 0.4857
</pre>
*
* @author ahbuss
*/
public class RunTwoCranesBerth {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
RandomVariate interarrivalTimeGenerator =
RandomVariateFactory.getInstance("Exponential", 0.7);
RandomVariate unloadingTimeGenerator =
RandomVariateFactory.getInstance("Uniform", 0.5, 1.5);
ShipArrivalProcess shipArrivalProcess =
new ShipArrivalProcess(interarrivalTimeGenerator,
unloadingTimeGenerator);
TwoCraneBerths twoCraneBerths = new TwoCraneBerths();
shipArrivalProcess.addSimEventListener(twoCraneBerths);
SimpleStatsTally delayInQueueStat = new SimpleStatsTally("delayInQueue");
SimpleStatsTally timeInSystemStat = new SimpleStatsTally("timeInSystem");
CollectionSizeTimeVaryingStats numberInQueueStat =
new CollectionSizeTimeVaryingStats("queue");
CollectionSizeTimeVaryingStats numberInBerthStat =
new CollectionSizeTimeVaryingStats("berth");
// SimplePropertyDumper simplePropertyDumper = new SimplePropertyDumper();
// twoCraneBerths.addPropertyChangeListener(simplePropertyDumper);
twoCraneBerths.addPropertyChangeListener(delayInQueueStat);
twoCraneBerths.addPropertyChangeListener(timeInSystemStat);
twoCraneBerths.addPropertyChangeListener(numberInQueueStat);
twoCraneBerths.addPropertyChangeListener(numberInBerthStat);
System.out.println(shipArrivalProcess);
System.out.println(twoCraneBerths);
double stopTime = 10 * 365;
Schedule.stopAtTime(stopTime);
Schedule.setVerbose(false);
Schedule.reset();
Schedule.startSimulation();
System.out.printf("%nSimulation ended at time %,.1f%n%n",
Schedule.getSimTime());
System.out.printf("Number of ships arriving:\t%,d%n", shipArrivalProcess.getNumberArrivals());
System.out.printf("Number of ships unloaded:\t%,d%n", timeInSystemStat.getCount());
System.out.printf("Maximum # in queue:\t\t%.0f%n", numberInQueueStat.getMaxObs());
System.out.printf("Average # in queue:\t\t%.4f%n", numberInQueueStat.getMean());
System.out.printf("Average # busy berths:\t\t%.4f%n", numberInBerthStat.getMean());
System.out.printf("Average time in system:\t\t%.4f%n",
timeInSystemStat.getMean());
System.out.printf("Average delay in queue:\t\t%.4f%n",
delayInQueueStat.getMean()); }
}
ant -f C:\\x-nps-gitlab\\NetworkedGraphicsMV3500\\examples -Dnb.internal.action.name=run.single -Djavac.includes=SimkitExamples/run/RunTwoCranesBerth.java -Drun.class=SimkitExamples.run.RunTwoCranesBerth run-single
init:
Deleting: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\built-jar.properties
deps-jar:
Updating property file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\built-jar.properties
Compiling 1 source file to C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\classes
compile-single:
run-single:
ShipArrivalProcess.1
unloadTimeGenerator = Uniform (0.500, 1.500)
interarrivalTimeGenerator = Exponential (0.700)
TwoCraneBerths.2
Simulation ended at time 3,650.0
Number of ships arriving: 5,135
Number of ships unloaded: 5,129
Maximum # in queue: 11
Average # in queue: 0.6834
Average # busy berths: 1.1737
Average time in system: 1.3207
Average delay in queue: 0.4857
BUILD SUCCESSFUL (total time: 3 seconds)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment