Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method UpdateMinMaxRHS ( 
 | 
  Real rhs, 
 | 
  MPConstraint constr 
 | 
) 
 | 
{ 
 | 
  Description: 'Updates the minimum and maximum right hand side of this scaling type' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // select the scaling type associated with this constraint 
 | 
     
 | 
    workaroundname := 'MP' + constr.Name() + 'Constraint';  
 | 
    scalingtypename := CapacityPlanningSuboptimizer::GetConstraintScaleType( workaroundname ); //usign workaround this is broken: typeofexpression( constr ).ShortName() ); 
 | 
     
 | 
    scalingtype := this.GetScalingType( scalingtypename ); 
 | 
     
 | 
    // Update the min and max rhs of this scaling type 
 | 
    absrhs := abs( rhs ); 
 | 
    if( absrhs <> 0 and absrhs.IsFinite() ) 
 | 
    { 
 | 
      if( absrhs < scalingtype.MinRHS() ) 
 | 
      { 
 | 
        scalingtype.MinRHS( absrhs ); 
 | 
        scalingtype.ConstraintNameMinRHS( constr.Name() ); 
 | 
      } 
 | 
      if( absrhs > scalingtype.MaxRHS() ) 
 | 
      { 
 | 
        scalingtype.MaxRHS( absrhs ); 
 | 
        scalingtype.ConstraintNameMaxRHS( constr.Name() ); 
 | 
      } 
 | 
    } 
 | 
  *] 
 | 
} 
 |