| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod ValidateInputSelectOptimizer ( | 
|   output String feedback_o, | 
|   OptimizerPuzzle optimizerpuzzle, | 
|   Strategy strategy, | 
|   Period_MP start, | 
|   Period_MP end, | 
|   MacroPlan macroplan, | 
|   Boolean iswebapp | 
| ) declarative remote as Boolean | 
| { | 
|   Description: 'Validate input used in the Designer when selecting optimizer input and strategy' | 
|   TextBody: | 
|   [* | 
|     feedback_o := ''; | 
|      | 
|     if( not iswebapp and isnull( optimizerpuzzle ) ) // Not implement optimizer puzzle for web yet | 
|     { | 
|       feedback_o := Translations::LibOBT_BenchmarkerParameter_ValidateInput_IsNullOptimizerPuzzle(); | 
|     } | 
|     else if( isnull( strategy ) ) | 
|     { | 
|       feedback_o := Translations::LibOBT_BenchmarkerParameter_ValidateInput_IsNullStrategy(); | 
|     } | 
|     else if( isnull( start ) ) | 
|     { | 
|       feedback_o := Translations::MP_AlgorithmRun_ValidateInputSelectOptimizer_IsNullStart(); | 
|     } | 
|     else if( isnull( end ) ) | 
|     { | 
|       feedback_o := Translations::MP_AlgorithmRun_ValidateInputSelectOptimizer_IsNullEnd(); | 
|     } | 
|     else if( start.SequenceNr() > end.SequenceNr() ) | 
|     { | 
|       feedback_o := Translations::MP_AlgorithmRun_ValidateInputSelectOptimizer_IsStartAfterEnd(); | 
|     } | 
|     else if( not strategy.GetHasValidContinuousLevels( feedback_o, iswebapp ) ) | 
|     { | 
|       feedback_o := feedback_o; | 
|     } | 
|     else if ( forall( macroplan, PlanningPeriod, period, period.Start() <= end.Start() and period.Start() >= start.Start(), period.HasAllUnitsFrozen() ) )  | 
|     { | 
|       feedback_o := Translations::MP_AlgorithmRun_ValidateInputSelectOptimizer_NoPeriodsAvailable(); | 
|     }                   | 
|     return feedback_o = ''; | 
|   *] | 
| } |