Exemplo n.º 1
0
    private void hlRun(string csvFile)
    {
        Console.CancelKeyPress += cancelHandler;

        entropyControl.updateStatus          = writeLine;
        entropyControl.directProgress        = directProgress;
        entropyControl.clearAbortFlagFunc    = clearAbortFlag;
        entropyControl.abortRunFunc          = abortRun;
        entropyControl.abortRunFuncMT        = abortRunMT;
        entropyControl.updateSimUIFunc       = updateSimUIST;
        entropyControl.updateSimUIMTFunc     = updateSimUIMT;
        entropyControl.updateProgressBarFunc = updateProgress;
        entropyControl.simRunningFunc        = simRunning;
        entropyControl.postSimUIFunc         = summary;

        string tmp;

        if (commonVars.getFriendly())
        {
            tmp = utility.Utils.friendlyNumber(commonVars.getSimulationSettings().getValue(EntropySettings.properties_i.nCases));
        }
        else
        {
            tmp = commonVars.getSimulationSettings().getValue(EntropySettings.properties_i.nCases).ToString();
        }
        Console.WriteLine("Starting run for " + tmp + " cases.");
        entropyControl.swTime = 0.0;
        bool threaded = varianceContext.numberOfThreads != 1;

        entropyControl.EntropyRun(commonVars.getSimulationSettings().getValue(EntropySettings.properties_i.nCases), csvFile, threaded, false);
    }