Example #1
0
        public HarmonySearchTestScenario(ObjectiveFunctionType functionType)
        {
            var objectiveFunctionTypes = new List <ObjectiveFunctionType> {
                functionType
            };

            Settings = CreateSettings(null, null, objectiveFunctionTypes);
        }
        public HarmonySearchAverageTestResult(HarmonySearchType harmonySearchType, HarmonyGeneratorType harmonyGeneratorType, ObjectiveFunctionType objectiveFunctionType, IEnumerable <HarmonySearchTestResult> testResults) : base(testResults)
        {
            HarmonySearchType     = harmonySearchType;
            ObjectiveFunctionType = objectiveFunctionType;
            HarmonyGeneratorType  = harmonyGeneratorType;

            ImprovisationCount = (int)testResults.Average(r => r.ImprovisationCount);
        }
Example #3
0
        public SimplexTuple(ObjectiveFunctionType type, double[,] eqCoeffs, List<EquationType> equationTypes,
		                    double[] freeTerms, double[] objFuncCoeffs, double objFuncFreeTerm = 0)
        {
            Type = type;
            EqualityCoeffs = new DenseMatrix(eqCoeffs);
            EquationTypes = equationTypes;
            FreeTerms = new DenseVector(freeTerms);
            ObjFuncCoeffs = new DenseVector(objFuncCoeffs);
            ObjFuncFreeTerm = objFuncFreeTerm;
        }
Example #4
0
        public HarmonySearchTestScenario(ObjectiveFunctionType functionType, HarmonyGeneratorType generatorType)
        {
            var harmonyGeneratorTypes = new List <HarmonyGeneratorType> {
                generatorType
            };
            var objectiveFunctionTypes = new List <ObjectiveFunctionType> {
                functionType
            };

            Settings = CreateSettings(harmonyGeneratorTypes, null, objectiveFunctionTypes);
        }
Example #5
0
        public static IObjectiveFunction <StopTimeInfo> GetInstance(ObjectiveFunctionType type, Location destination)
        {
            switch (type)
            {
            case ObjectiveFunctionType.TravelTime:
                return(new TravelTimeObjectiveFunction(destination));

            case ObjectiveFunctionType.Transfers:
                return(new TransfersObjectiveFunction(destination));

            case ObjectiveFunctionType.Comprehensive:
                return(new ComprehensiveObjectiveFunction(destination));

            default:
                return(new ComprehensiveObjectiveFunction(destination));
            }
        }