From f2be265ce6a6fcb258f1cd5b2ff63433c7a86ac0 Mon Sep 17 00:00:00 2001 From: Stefan Derkits Date: Mon, 20 May 2013 18:55:50 +0200 Subject: [PATCH] added numPMs & numCloudPartners to Input --- build.xml | 23 +++++++++++++++++++---- src/at/ac/tuwien/lsdc/SchedSimulator.java | 16 +++++++++++----- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/build.xml b/build.xml index a1e67e7..0d2484a 100644 --- a/build.xml +++ b/build.xml @@ -5,6 +5,9 @@ + + + @@ -40,11 +43,20 @@ + + + + + + + + + @@ -56,6 +68,8 @@ + + @@ -67,16 +81,17 @@ + + - - + + - + diff --git a/src/at/ac/tuwien/lsdc/SchedSimulator.java b/src/at/ac/tuwien/lsdc/SchedSimulator.java index ee741f8..003e6c2 100644 --- a/src/at/ac/tuwien/lsdc/SchedSimulator.java +++ b/src/at/ac/tuwien/lsdc/SchedSimulator.java @@ -31,16 +31,18 @@ public class SchedSimulator { private static ScenarioType scenario; private static SchedulerType schedulerType; + private static int numPMs; + private static int numCloudPartners; private static File inputFile; private static File generalLog; private static File schedulerLog; public static void main(String[] args) throws Exception { - if (args.length == 5) { + if (args.length == 7) { parseCommandLineArgs(args); } else if (args.length == 1) { String[] newArgs = args[0].split(" "); - if (newArgs.length == 5) { + if (newArgs.length == 7) { parseCommandLineArgs(newArgs); } else { log.info(USAGE); @@ -79,12 +81,16 @@ public class SchedSimulator { private static void parseCommandLineArgs(String[] args) { String scenarioStr = args[0]; String schedulerTypeStr = args[1]; - String inputFileStr = args[2]; - String schedulerLogStr = args[3]; - String scenarioLogFileStr = args[4]; + String numPMsStr = args[2]; + String numCloudPartnersStr = args[3]; + String inputFileStr = args[4]; + String schedulerLogStr = args[5]; + String scenarioLogFileStr = args[6]; try { scenario = ScenarioType.valueOf(scenarioStr); schedulerType = SchedulerType.valueOf(schedulerTypeStr); + numPMs = Integer.parseInt(numPMsStr); + numCloudPartners = Integer.parseInt(numCloudPartnersStr); inputFile = new File(inputFileStr); if (!inputFile.canRead()) throw new IOException("Can not read input file"); -- 2.43.0