chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
Quintiq file version 2.0
#parent: #root
MethodOverride CreateIssue (LibOpt_SuboptimizerScopeElement suboptimizerscopeelement, String issuetype, const constcontent LibOpt_StatisticSeverityScaleEntrys severityscaleentries_lowerthresholdviolation, 
  const constcontent LibOpt_StatisticSeverityScaleEntrys severityscaleentries_upperthresholdviolation)
{
  Description: 'Create a `LibOpt_Issue` for the given "suboptimizer scope element" (`LibOpt_SuboptimizerScopeElement`) if its `LibOpt_SuboptimizerScopeElement.NoImprovementPercentage` violates the `UpperThreshold` of this statistic.'
  TextBody:
  [*
    if( suboptimizerscopeelement.NoImprovementPercentage() > this.UpperThreshold() )
    {
      // Create an Issue and link it with the relevant Suboptimizer Scope Element.
      LibOpt_Issue::Create( this,
                            suboptimizerscopeelement,
                            issuetype,
                            this.Focus() + ', ' + suboptimizerscopeelement.ScopeElement().Identifier(),
                            this.GetSeverity( suboptimizerscopeelement.NoImprovementPercentage(), true /*is upper threshold violation*/, severityscaleentries_upperthresholdviolation ),
                            Translations::LibOpt_Issue_Details_ScopeElementNoImprovement( suboptimizerscopeelement.NoImprovementPercentage(),
                                                                                          this.LowerThreshold(),
                                                                                          this.UpperThreshold(),
                                                                                          LibOpt_Statistic::GetFormat( suboptimizerscopeelement.NoImprovementPercentage(),
                                                                                                                       this.LowerThreshold(),
                                                                                                                       this.UpperThreshold() ) )
                          );
    }
  *]
}