admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 );
  *]
}