Esempio n. 1
0
        public static float ProductionRateForConfiguration(FlowlineConfiguration flc)
        {
            var tmpFilenameBase = $"temp_hash_{flc.GetHashCode()}";

            InstanceWriter.WriteInstanceToFile(flc, tmpFilenameBase + ".mrn");
            RunSimulationExecutable(tmpFilenameBase);
            var productionRate = ResultParser.ProductionRateFromResultFile(tmpFilenameBase + ".stb");
            var extensions     = new List <string> {
                ".mrn", ".stb"
            };

            extensions.ForEach(ext => RetryDelete(tmpFilenameBase + ext));
            return(productionRate);
        }