Desmo-J – Framework für ereignisorientierte diskrete Simulation in neuer Version
DESMO-J steht für „Discrete Event Simulation Modeling in Java“ und ist in Version 2.1.4b erschienen.
Software mit Potenzial? Jedenfalls denkt Tibco das. Denn DESMO-J ist der Kern der Simulationskomponente der BPM (Business Process Modelling)-Software iProcess Suite. Auch wenn dies nach Informationen der Universität Hamburg (allgemeine Infos) die letzte 2 er Version gewesen sein wird, bedeutet es nicht, dass Desmo-J eingestellt wird. Ganz im Gegenteil; die Entwicklung schreitet voran und es wird in Version 3 sogar eine Integration in Eclipse geben. Zusätzlich wird sich am Kern der Simulation einiges tun. Stichworte: Echtzeitfähigkeit,agentenbasierte Simulation
Bis es soweit sein wird müssen sich interessierte Simulanten mit der der 2.1.4b zu frieden geben.
Warum Desmo-J? Hier nochmal im Schnelldurchlauf:
- Flexibel und leichte Integration, da auf Java basierend (dot.net-Version auf Anfrage). Modellierung beliebig komplexer Systeme, da keine strukturellen Vorgaben zur Modelldynamik.
- Generisch: Komplette “Infrastruktur” für die Simulation wird bereitgestellt: Ereignisliste/Uhr, Zufallszahlen und statische Verteilungen, Datensammler und Reportausgabe, allgemeine Objekte (z.B. Warteschlangen, Pools mit Ressourcen mit Zugriff im wechselseitgen Auschluss)…
- Modellierung des zu untersuchenden Systems durch Ereignisse (=Kapselung der Geschehnisse, die an einem Zeitpunkt stattfindet) oder Prozesse (=Beschreibung des Verhaltens der Objekte während Lebenszyklus im Zeitverlauf) möglich.
Alleinstellungsmerkmal von DESMO-J: Ereignisse und Prozesse können auch kombiniert werden.
- GUI zur Spezifikation von Modell- und Experimentparametern.
- Freie Software, Apache 2.0-Lizenz, kann kostenlos zu Forschungs- und kommerziellen Zwecken eingesetzt werden.
- Tutorial zum leichten Einstieg
Quelle: http://desmoj.sourceforge.net/home.html und Mitarbeiter der Universität Hamburg
Beispielmaterial Java Quellcode:
z.B. die komplette Modellierung eines (einfachen) VanCarriers auf einem Containertermial
import desmoj.core.simulator.*;
/**
* This class represents a van carrier (VC).
* The VC waits until a truck requests its service.
* It will then fetch the container and load it onto
* the truck.
* If there is another truck waiting it starts serving this
* truck. Otherwise it waits again for the next truck to arrive.
*/
public class VanCarrier extends SimProcess {
/** a reference to the model this process is a part of
* useful shortcut to access the model's static components
*/
private ProcessesExample myModel;
/**
* Constructor of the van carrier process
*
* Used to create a new VC to serve trucks.
*
* @param owner the model this process belongs to
* @param name this VC's name
* @param showInTrace flag to indicate if this process shall produce output
* for the trace
*/
public VanCarrier(Model owner, String name, boolean showInTrace) {
super(owner, name, showInTrace);
// store a reference to the model this VC is associated with
myModel = (ProcessesExample)owner;
}
/**
* Describes this van carrier's life cycle.
*
* It will continually loop through the following steps:
* Check if there is a customer waiting.
* If there is someone waiting
* a) remove customer from queue
* b) serve customer
* c) return to top
* If there is no one waiting
* a) wait (passivate) until someone arrives (who reactivates the VC)
* b) return to top
*/
public void lifeCycle() {
// the server is always on duty and will never stop working
while (true) {
// check if there is someone waiting
if (myModel.truckQueue.isEmpty()) {
// NO, there is no one waiting
// insert yourself into the idle VC queue
myModel.idleVCQueue.insert(this);
// and wait for things to happen
passivate();
} else {
// YES, there is a customer (truck) waiting
// get a reference to the first truck from the truck queue
Truck nextTruck = myModel.truckQueue.first();
// remove the truck from the queue
myModel.truckQueue.remove(nextTruck);
// now serve it (fetch container and load it onto truck)
// service time is represented by a hold of the VC process
hold(new SimTime(myModel.getServiceTime()));
// from inside to outside...
// ...draw a new period of service time
// ...make a SimTime object out of it
// ...and hold for this amount of time
// now the truck has received its container and can leave
// we will reactivate it, to allow it to finish its life cycle
nextTruck.activate(new SimTime(0.0));
// the VC can return to top and check for a new customer
}
}
}
} /* end of process class */
