package uk.ac.eeci;

import io.improbable.scienceos.Conductor;
import org.apache.commons.cli.*;

public class CommandLineInterface {

    private String inputFilePath;
    private String outputFilePath;

    public static void main(String ... args) {

        Options options = new Options();

        Option input = new Option("i", "input", true, "file path to scenario db");
        input.setRequired(true);
        options.addOption(input);

        Option output = new Option("o", "output", true, "file path for output db");
        output.setRequired(true);
        options.addOption(output);

        CommandLineParser parser = new DefaultParser();
        HelpFormatter formatter = new HelpFormatter();
        CommandLine cmd;

        try {
            cmd = parser.parse(options, args);
        } catch (ParseException e) {
            System.out.println(e.getMessage());
            formatter.printHelp("energy-agents", options);

            System.exit(1);
            return;
        }

        CommandLineInterface cli = new CommandLineInterface();
        cli.inputFilePath = cmd.getOptionValue("input");
        cli.outputFilePath = cmd.getOptionValue("output");
        cli.run();
    }

    private void run() {
        CitySimulation citySimulation = ScenarioBuilder.readScenario(this.inputFilePath, this.outputFilePath);
        new Conductor(citySimulation).run();
    }
}

@@ -56,16 +56,101 @@
 ductor;%0A
+import io.improbable.scienceos.Reference;%0Aimport io.improbable.scienceos.WorkerPool;%0A
 import o
@@ -1305,24 +1305,184 @@
 oid run() %7B%0A
+        Reference.pool = new WorkerPool(4); // FIXME shouldnt be here%0A        Reference.pool.setCurrentExecutor(Reference.pool.main); // FIXME shouldnt be here%0A
         City

Add scienceos init to command line interface