Курсовая работа: Разработка модели теории массового обслуживания
return Double.POSITIVE_INFINITY;
}
protected State delta_int() {
return this.getPresentState();
}
protected State delta_ext() {
State newState = findState("busy");
return newState;
}
protected LinkedList lambda() {
LinkedList list = new LinkedList();
MessagePort mp1 = new MessagePort();
MessagePort mp2 = new MessagePort();
MessagePDEVS msg1 = new MessagePDEVS();
MessagePDEVS msg2 = new MessagePDEVS();
/* System.out.println("Сервер 1");*/
if (this.getCurrentPort().getType().equals("fromPrev")) {
V=ra.nextDouble();
if((V<P)||(V==P)){
msg1.setTimeStamp(this.getLastTime() + ta);
mp1.setPort("toNext");
msg1.setData("from Server to Client: Message have being processing from" + this.getLastTime() + " till " + msg1.getTimeStamp());
mp1.setMessage(msg1);
list.add(mp1);
msg2.setTimeStamp(this.getLastTime()+ ta);
msg2.setPriority(1);
mp2.setPort("toPrev");
msg2.setData("from Server to Queue: Server is free");
mp2.setMessage(msg2);