| Quintiq file version 2.0 | 
| #parent: #root | 
| Method InitForScaling ( | 
|   CapacityPlanningSuboptimizer_CapacityPlanningAlgorithm program | 
| ) | 
| { | 
|   TextBody: | 
|   [* | 
|     // Update the constraint statistics for automatic scaling | 
|     debuginfo(  '>> Init for scaling. ' ); | 
|      | 
|     //moving all updates on variables into the handle feasible, so methods can be read only. Originally we call with the unscaled(non cplex value) then divide to get cplex bound | 
|     //so now we start with the actual cplex bound in the call so no need to scale by dividing. Only difference would be squashing tiny values  | 
|     traverse(  program, Variables, var, AlgorithmScaling::IsVariableForScaling( var ) )  | 
|     {  | 
|       bound := var.LowerBound();  | 
|       if ( bound.IsFinite() ) | 
|       { | 
|         this.UpdateMinMaxBound( bound, var ); | 
|       } | 
|       bound := var.UpperBound();  | 
|       if ( bound.IsFinite() )  | 
|       { | 
|         this.UpdateMinMaxBound( bound, var );  | 
|       } | 
|     }  | 
|     this.Optimization().astype( Optimization ).AlgorithmScaling().UpdateConstraintStatistics( program ); | 
|     debuginfo(  '<< Done init' ); | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |