Ejemplo n.º 1
0
        public float getProcessValue()
        {
            float processValue = 0;

            for (int stepNumber = 0; stepNumber < listOfSteps.Count; stepNumber++)
            {
                SolverStep currentStep     = (SolverStep)listOfSteps[stepNumber];
                float      currentPassed   = currentStep.getCarsPassed();
                float      maxPerPasPassed = currentStep.getMaxPasPassed();
                float      awaitingCars    = currentStep.getAwaitingCarsCount();

                float value = currentPassed / (((Convert.ToBoolean(awaitingCars) ? awaitingCars: 1) * (Convert.ToBoolean(maxPerPasPassed) ? maxPerPasPassed :1)));

                processValue += value;
            }
            float returrned = (float)(processValue / Math.Pow((double)listOfSteps.Count, 2.0));

            return(returrned);
        }
Ejemplo n.º 2
0
 public void addStep(SolverStep step)
 {
     this.listOfSteps.Add(step);
 }