Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Function CalcHasAcceptableRunResult 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // desmondt Oct-1-2014 (created) 
 | 
     
 | 
    isfeasible := this.BenchmarkForKPI() <> ''; 
 | 
     
 | 
    matchedkpi := this.BenchmarkForKPI() = Translations::LibOBT_Benchmarker_RunResultMatched(); 
 | 
     
 | 
    iskpiokay := matchedkpi 
 | 
                 or this.BenchmarkForKPI() = Translations::LibOBT_Benchmarker_RunResultImproved(); 
 | 
     
 | 
    isdurationokay := this.BenchmarkForDuration() = Translations::LibOBT_Benchmarker_RunResultMatched() 
 | 
                      or this.BenchmarkForDuration() = Translations::LibOBT_Benchmarker_RunResultImproved(); 
 | 
     
 | 
    // Determine whether the result is acceptable for a benchmarking run 
 | 
    // A run is acceptable when the result is feasible, the KPIs are better than the KT, or the KPIs are equal and the duration is at least equal 
 | 
    value := isfeasible 
 | 
             and iskpiokay 
 | 
             and not ( matchedkpi and not isdurationokay ); 
 | 
    // Determine whether the result is acceptable for an optimizer test instance run. 
 | 
    // A run is acceptable when the result is feasible and the KPIs equal to the KT KPIs 
 | 
    if( not this.IsBenchmark() ) 
 | 
    { 
 | 
      value := isfeasible and matchedkpi 
 | 
    } 
 | 
     
 | 
    this.HasAcceptableRunResult( value ); 
 | 
  *] 
 | 
} 
 |