private void Summarize()
 {
     using (var sw = new StreamWriter(Args.AwayTeamPath + "\\Fitness", false))
     {
         sw.WriteLine(fitnessCounter.Fitness(game, optimizationData));
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 目标函数
 /// </summary>
 /// <param name="X">目标函数输入——优化变量</param>
 /// <param name="model">模型接口</param>
 /// <param name="Delta">违反度,输出参数,未违反约束时为0</param>
 /// <returns>适应度函数值</returns>
 private double ObjectFunction(double[] X, out double Delta)
 {
     return(fitness.Fitness(X, model, out Delta));
     //ObjectFunctions O = new ObjectFunctions();
     //return O.ObjectFunctionWithCon(X, out Delta);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 目标函数
 /// </summary>
 /// <param name="X">目标函数输入——优化变量</param>
 /// <param name="model">模型接口</param>
 /// <param name="Delta">违反度,输出参数,未违反约束时为0</param>
 /// <returns>适应度函数值</returns>
 private double ObjectFunction(double[] X, out double Delta)
 {
     return(fitness.Fitness(X, model, out Delta));
 }