public static void Main(string[] args)
        {
            Util.ArgsProcessor argsProcessor = new Util.ArgsProcessor();
            argsProcessor.process(args, Parameters.Options, Parameters.Switches);

            if (argsProcessor.getSwitchArg(Parameters.HelpSwitch)) {
                Parameters.printHelp();
            }

            Solver.Environment env = loadEnvironment(argsProcessor);

            string path;
            path = argsProcessor.getMappedArg(Parameters.ConfigurePathOption);
            TabuSolver.Configure cfg = (path != null)
                ? Util.readJsonFile<TabuSolver.Configure>(path)
                : new TabuSolver.Configure();

            INRC2.JsonData input = new INRC2.JsonData();
            Problem problem = new Problem();

            input.scenario = Util.readJsonFile<INRC2.JsonData.ScenarioInfo>(
                env.scenarioPath);
            problem.importScenario(input);

            input.weekdata = Util.readJsonFile<INRC2.JsonData.WeekdataInfo>(
                env.weekdataPath);
            problem.importWeekdata(input);

            // load history last for it will initialize some assist data depending on scenario and weekdata
            if (env.customInputPath != null) {
                problem.readCustomFile(env.customInputPath);
            } else {
                input.history = Util.readJsonFile<INRC2.JsonData.HistoryInfo>(
                    env.historyPath);
                problem.importHistory(input);
            }

            TabuSolver solver = new TabuSolver(problem, env, cfg);
            solver.solve();

            Util.writeJsonFile(env.solutionPath, problem.exportSolution(solver.Optima));

            path = argsProcessor.getMappedArg(Parameters.LogPathOption);
            if ((env.customOutputPath != null) || (path != null)) {
                solver.adjustObjValueForLog();

                if (env.customOutputPath != null) {
                    problem.writeCustomFile(env.customOutputPath, solver);
                }

                if (path != null) {
                    solver.print();
                    solver.record(path);
                }
            }
        }