-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRunSimulator
More file actions
38 lines (33 loc) · 956 Bytes
/
Copy pathRunSimulator
File metadata and controls
38 lines (33 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import Event.Event;
import Event.EventQueue;
import Event.OpenEvent;
import Event.State;
import Event.Supermarket;
/**
*
* @author Malte Olofsson, Oskar Dahlbeck, Filip Bergström, Lana Abdulla
*
*/
public class RunSimulator {
public static void main(String[] args) {
int antalKassor = 2;
int max = 7;
double closingTime = 8.0;
long seed = 13;
double lambda = 3.0;
double lowerPick = 0.6;
double upperPick = 0.9;
double lowerPay = 0.35;
double upperPay = 0.6;
EventQueue eventQueue = new EventQueue();
Supermarket mySupermarket = new Supermarket(antalKassor,max,closingTime, seed, lambda, lowerPick
, upperPick, lowerPay, upperPay,eventQueue);
State s = new State();
Event startEvent = new OpenEvent(mySupermarket, eventQueue , s);
View view = new SupermarketView(s, mySupermarket);
Simulator sim = new Simulator(s, eventQueue, startEvent);
view.firstPrint();
sim.run();
view.lastPrint();
}
}