Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetKPI ( 
 | 
  Boolean includeintbased, 
 | 
  Boolean intbasedonly, 
 | 
  const WeightLevelNonFinancial weightlevels, 
 | 
  output RealVector financialvec_o, 
 | 
  output RealVector financialvec_pos_o, 
 | 
  output String financialdescr 
 | 
) as owning RealVector 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    maxlevel := this.MaxLevel() ;  
 | 
    result := RealVector::Construct( maxlevel + 1 ); // 1 more for slack level 
 | 
    financialvec_o.Resize( maxlevel + 1, 0.0 ); // 1 more for slack level 
 | 
    financialvec_pos_o.Resize( maxlevel + 1, 0.0 ); // 1 more for slack level 
 | 
    applyrounding := this.RoundPuzzleScoreDecimal() >= 0;  
 | 
    financialdescr := '';  
 | 
    for ( i := 0; i <= maxlevel; i++ )  
 | 
    { 
 | 
      minweightused := Real::MaxReal();  
 | 
      maxweightused := 0.0;  
 | 
      fdescr := '';  
 | 
      score_vec := this.GetPuzzleScore( i, includeintbased, intbasedonly, weightlevels, minweightused, maxweightused, fdescr );  
 | 
      score := score_vec.Get( 0 );  
 | 
      score_financial := score_vec.Get( 2 );  
 | 
      score_financialpos := score_vec.Get( 3 );  
 | 
      if ( not fdescr = '' ) 
 | 
      {  
 | 
        financialdescr := financialdescr + 'level=' + [String] i + fdescr;  
 | 
      } 
 | 
      if ( applyrounding )  
 | 
      { 
 | 
        score := score.Round( this.RoundPuzzleScoreDecimal() );  
 | 
        score_financial := score_financial.Round( this.RoundPuzzleScoreDecimal() );  
 | 
        score_financialpos := score_financialpos.Round( this.RoundPuzzleScoreDecimal() );  
 | 
      } 
 | 
      result.Set( i, score / maxvalue(  1.0, maxweightused ) );    
 | 
      financialvec_o.Set( i, score_financial / maxvalue(  1.0, maxweightused ) );    
 | 
      financialvec_pos_o.Set( i, score_financialpos / maxvalue(  1.0, maxweightused ) );    
 | 
    }     
 | 
    return &result 
 | 
  *] 
 | 
  InterfaceProperties { Accessibility: 'Module' } 
 | 
} 
 |