1 package at.ac.tuwien.lsdc;
3 import java.util.LinkedList;
5 import org.slf4j.Logger;
6 import org.slf4j.LoggerFactory;
8 import at.ac.tuwien.lsdc.sched.AbstractScheduler;
9 import at.ac.tuwien.lsdc.sched.SchedulerA;
10 import at.ac.tuwien.lsdc.sched.SchedulerB;
11 import at.ac.tuwien.lsdc.sched.SchedulerC;
12 import at.ac.tuwien.lsdc.types.Application;
13 import at.ac.tuwien.lsdc.types.ScenarioData;
14 import at.ac.tuwien.lsdc.util.CSVParser;
15 import at.ac.tuwien.lsdc.util.CSVScenariosLogger;
18 * Read config (command line properties) and start Scheduler-Simulation.
20 public class SchedSimulator {
21 private static final Logger log = LoggerFactory.getLogger(SchedSimulator.class);
23 private static String schedulerType;
24 private static String inputFile;
25 private static String scenario;
27 public static void main(String[] args) throws Exception {
28 log.info("Hello World!");
29 parseCommandLineArgs(args);
30 CSVParser parser = new CSVParser(inputFile);
31 LinkedList<Application> apps = parser.parseFile();
32 AbstractScheduler scheduler;
33 switch (schedulerType) {
35 scheduler = new SchedulerA();
37 scheduler = new SchedulerB();
39 scheduler = new SchedulerC();
42 ScenarioData data = scheduler.initAndStart(apps);
43 CSVScenariosLogger logger = new CSVScenariosLogger("out_scen"+scenario+"sched"+schedulerType+".csv");
44 logger.appendScenarioData(data);
47 private static void parseCommandLineArgs(String[] args) {