Quintiq file version 2.0
|
#parent: #root
|
Method FreezeVariableLowerBound (
|
MPVariable var,
|
Real lowerbound,
|
Boolean isfreezewithslack
|
) const
|
{
|
Description: 'Set lower bound of the variable, with scaling factor influence'
|
TextBody:
|
[*
|
// soh yee Mar-24-2014 (created)
|
|
lowerbound := this.ScaleVariable( var, lowerbound ); // scale the lower bound
|
|
// (12110) Haikal Pribadi
|
// Freeze small values (1e-6) to zero, but give a warning for us to eventually debug when we can reproduce
|
cplexaccuracy := this.SmallestFeasibilityTolerance();
|
if( abs( lowerbound ) <= cplexaccuracy )
|
{
|
if( 0.0 < abs( lowerbound ) )
|
{
|
info( "WARNING: Variable '", var.Name(), "' has encountered a lower bound value <= ",cplexaccuracy,", rounding to 0.0" );
|
}
|
lowerbound := 0.0;
|
}
|
|
if( isfreezewithslack )
|
{
|
lowerbound := lowerbound - 1e-4;
|
}
|
|
var.LowerBound( lowerbound );
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|