Quintiq file version 2.0
|
#parent: #root
|
Method UpdateMinMaxOptValue (
|
MPVariable variable,
|
CapacityPlanningSuboptimizer subopt
|
)
|
{
|
Description: 'Updates the minimum and maximum optimal value of a scaling type'
|
TextBody:
|
[*
|
scalingtypename := CapacityPlanningSuboptimizer::GetVariableScaleType( typeofexpression( variable ).ShortName() );
|
scalingtype := this.GetScalingType( scalingtypename );
|
|
// Update the minimum/maximum optimal value of this scaling type
|
optvalue := subopt.FilterCPLEXNoise( abs( variable.OptimalValue() ) );
|
if( optvalue <> 0 and optvalue.IsFinite() )
|
{
|
if( optvalue < scalingtype.MinOptValue() )
|
{
|
scalingtype.MinOptValue( optvalue );
|
scalingtype.VariableNameMinOptValue( variable.Name() );
|
}
|
if( optvalue > scalingtype.MaxOptValue() )
|
{
|
scalingtype.MaxOptValue( optvalue );
|
scalingtype.VariableNameMaxOptValue( variable.Name() );
|
}
|
}
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|