| Quintiq file version 2.0 | 
| #parent: #root | 
| Method MetaOptimizerCreateSupportDataShiftOptimizer ( | 
|   MacroPlan macroplan, | 
|   OptimizerPuzzle puzzle, | 
|   RunContextForCapacityPlanning runcontext | 
| ) | 
| { | 
|   TextBody: | 
|   [* | 
|     if ( runcontext.IsMetaIteration() )  | 
|     { | 
|       nrshiftpatterns := macroplan.ShiftPattern( relsize );  | 
|       traverse( puzzle.GetIncludedUnits(), Elements.UnitPeriod.astype( UnitPeriodTime ), up )  | 
|       { | 
|         rv := RealVector::Construct( nrshiftpatterns, 0.0 ); // pre computed capacities for shift assignment. To avoid recomputing each time in meta optimizer | 
|          | 
|         traverse( up, Unit.UnitShiftPatternAllowed.ShiftPattern, sp )  | 
|         { | 
|           rv.Set( sp.Index(), up.GetTotalAvailableCapacity( sp ) ); | 
|         } | 
|         up.MetaOptimizerTotalAvailableCapacityVector( rv.AsBinaryValue() );  | 
|       } | 
|     } | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |