Exemple #1
0
 public int?CanSolve(CPUProblem p)
 {
     if (p.RequiredThreads <= this.threads)
     {
         SolvingInfo.Solved(this.model, p.Name);
         return(p.Computation());
     }
     SolvingInfo.NotSolved(this.model, p.Name);
     return(null);
 }
Exemple #2
0
 public int?CanSolve(CPUProblem p)
 {
     if (DidThermalThrottle())
     {
         SolvingInfo.NotSolved(this.model, p.Name);
         return(null);
     }
     SolvingInfo.Solved(this.model, p.Name);
     this.temperature += CPUProblemTemperatureMultiplier * p.RequiredThreads;
     return(p.Computation());
 }
Exemple #3
0
        public int?CanSolve(GPUProblem p)
        {
            if (DidThermalThrottle())
            {
                SolvingInfo.NotSolved(this.model, p.Name);
                return(null);
            }
            SolvingInfo.Solved(this.model, p.Name);

            this.temperature += p.GpuTemperatureIncrease;
            return(p.Computation());
        }
        public override int?CanSolve(NetworkProblem p)
        {
            int?result;

            if ((result = base.CanSolve(p)) != null)
            {
                SolvingInfo.Solved(this.model, p.Name);
                return(result);
            }
            SolvingInfo.NotSolved(this.model, p.Name);
            return(null);
        }
        public override int?CanSolve(NetworkProblem p)
        {
            int?result;

            if (rng.NextDouble() < packetLossChance && (result = base.CanSolve(p)) != null)
            {
                SolvingInfo.Solved(this.model, p.Name);
                return(result);
            }

            SolvingInfo.NotSolved(this.model, p.Name);
            return(null);
        }
Exemple #6
0
 public int?CanSolve(NetworkProblem p)
 {
     SolvingInfo.NotSolved(this.model, p.Name);
     return(null);
 }