| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod ValidateBottlenecktInput ( | 
|   output String feedback_o, | 
|   output String sanitycheckfeedback_o, | 
|   MacroPlan macroplan, | 
|   Real bottlenecktolerance, | 
|   Duration bottleneckwindowstart, | 
|   Duration bottleneckwindowend, | 
|   Real capacitybelowthreshold, | 
|   Real capacityabovethreshold, | 
|   Real stockingpointbottleneckthreshold, | 
|   Boolean isweb | 
| ) declarative remote as Boolean | 
| { | 
|   Description: 'Called by designer' | 
|   TextBody: | 
|   [* | 
|     /***** | 
|      PLEASE ENSURE THAT DATA ISSUE IS CHECKED BEFORE DATA WARNING | 
|     **/ | 
|      | 
|     if( feedback_o ='' ) | 
|     { | 
|       // Bottleneck tolerance | 
|       if ( bottlenecktolerance < 0 ) | 
|       { | 
|        feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsNegativeBottleneckTolerance( bottlenecktolerance ); | 
|        sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning(); | 
|       } | 
|       // Bottleneck window start and end | 
|       else if( bottleneckwindowstart > bottleneckwindowend ) | 
|       { | 
|        feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsStartAfterEndOfBottlneckWindow( bottleneckwindowend, bottleneckwindowstart ); | 
|        sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning(); | 
|       } | 
|       // Capacity above threshold | 
|       else if( capacityabovethreshold < 0 ) | 
|       { | 
|        feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsNegativeCapacityAboveThreshold( capacityabovethreshold ); | 
|        sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning(); | 
|       } | 
|       // Capacity below threshold | 
|       else if( capacitybelowthreshold < 0 ) | 
|       { | 
|        feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsNegativeCapacityBelowThreshold( capacitybelowthreshold ); | 
|        sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning(); | 
|       } | 
|       // Capacity above and below threshold | 
|       else if( capacityabovethreshold < capacitybelowthreshold ) | 
|       { | 
|        feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsCapacityAboveThresholdLessThanCapacityBelowThreshold( capacityabovethreshold, capacitybelowthreshold ); | 
|        sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning(); | 
|       } | 
|        // Bottleneck tolerance | 
|       else if ( stockingpointbottleneckthreshold < 0 ) | 
|       { | 
|        feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsNegativeBottleneckThreshold( stockingpointbottleneckthreshold ); | 
|        sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning(); | 
|       } | 
|        | 
|     } | 
|      | 
|     // Add instance text | 
|     if ( isweb and  feedback_o <> '' ) | 
|     { | 
|      feedback_o := SanityCheckMessage::GetFormattedMessage( Translations::MP_Bottleneck_Detection_Parameters_Instance(), feedback_o ); | 
|     } | 
|      | 
|     return feedback_o = ''; | 
|   *] | 
| } |