示例#1
0
        SeasonPlannerResult GetBestDecisionThread3(int initialRaceId, SeasonPlannerFullLine spFull, Random random)
        {
            SeasonPlannerDecision[] spDecisions     = new SeasonPlannerDecision[17];
            SeasonPlannerDecision[] bestSpDecisions = new SeasonPlannerDecision[17];

            //Generate and test spDecision
            for (int j = initialRaceId; j < 17; j++)
            {
                spDecisions[j - initialRaceId] = SpHelper.GenerateRandomDecisionValues(random);
                spFull.spDecisions             = spDecisions[j - initialRaceId];

                spFull.spTable.SeasonRaceNumber = j;
                spFull = SpHelper.ProcessSeasonPlanner(spFull);
            }

            SeasonPlannerResult spDecBal = new SeasonPlannerResult();

            spDecBal.spDecisions   = (SeasonPlannerDecision[])spDecisions.Clone();
            spDecBal.random        = random;
            spDecBal.finalPoints   = spFull.spTab.CurrentPoints;
            spDecBal.finalBalanceM = spFull.spTable.BalanceAfterRaceM;

            return(spDecBal);
        }