renhao
2023-10-25 883c992fbd09b3ac7c40c3fce28a5af3ec54eb90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Quintiq file version 2.0
#parent: #root
Method GetLocalKPI (
  String kpiName,
  LibOpt_Scope scope
) const as Real
{
  Description:
  [*
    Returns the value of the `LibOpt_KPILocal` that has the same name as the one provided.
    If a matching KPI is not found this method returns 0.0.
  *]
  TextBody:
  [*
    // benlong Mar-31-2022 (created)
    kpi :=  select( this, KPIOnRun.KPI.astype( LibOpt_KPILocal ), kpi, kpi.Name() = kpiName )
    return guard( kpi.Capture( scope ), 0.0 );
  *]
}