BoundControl
Controls for functions related to bound
IsUsePrimalBound
public override bool IsUsePrimalBound()
Definition
Sets whether the logic to get the primal bound from state is applied.
Return
Boolean
True: Apply logic to find the primal bound. False: Do not apply logic to find the primal bound.
True
Example (Default Logic)
public override bool IsUsePrimalBound()
{
return true;
}
IsUseDualBound
public override bool IsUseDualBound()
Definition
Sets whether the logic to get the dual bound from state is applied.
Return
Boolean
True: Apply logic to find the dual bound. False: Do not apply logic to find the dual bound.
True
Example (Default Logic)
public override bool IsUseDualBound()
{
return true;
}
GetPruneTolerance
public override double GetPruneTolerance()
Definition
The tolerance used to determine whether the state can be pruned without loss of optimality.
Return
Double
The prune tolerence.
0.0001
Example (Default Logic)
public override double GetPruneTolerance()
{
return Math.Pow(10, -4);
}
GetPrimalBoundStopStageIndex
public override int GetPrimalBoundStopStageIndex()
Definition
Sets the index of the stage that stops applying the logic to obtain the primal bound. (i.e., the primal bound is not obtained from that stage.)
Return
Integer
The starting stage index for which the primal bound will not be obtained.
Int32.MaxValue
Example (Default Logic)
public override int GetPrimalBoundStopStageIndex()
{
return Int32.MaxValue;
}
GetPrimalBoundStopRelativeGap
public override double GetPrimalBoundStopRelativeGap()
Definition
Sets a relative duality gap at which to stop applying the logic to find the primal bound. (i.e., primal bound will not be found when the relative duality gap is satisfied.)
Return
Double
The relative duality gap for which the primal bound will not be obtained.
0
Example (Default Logic)
public override double GetPrimalBoundStopRelativeGap()
{
return 0;
}
GetDualBoundStopStageIndex
public override int GetDualBoundStopStageIndex()
Definition
Sets the index of the stage that stops applying the logic to obtain the dual bound. (i.e., dual bound is not obtained from that stage.)
Return
Integer
The starting stage index for which the dual bound will not be obtained.
Int32.MaxValue
Example (Default Logic)
public override int GetPrimalBoundStopStageIndex()
{
return Int32.MaxValue;
}
GetDualBoundStopRelativeGap
public override double GetDualBoundStopRelativeGap()
Definition
Sets a relative duality gap at which to stop applying the logic to find the dual bound. (i.e., dual bound will not be found when the relative duality gap is satisfied.)
Return
Double
The relative duality gap for which the dual bound will not be obtained.
0
Example (Default Logic)
public override double GetDualBoundStopRelativeGap()
{
return 0;
}
GetInitialPrimalBound
public override double GetInitialPrimalBound(ObjectiveFunctionType objectiveFunctionType)
Definition
Returns the initial primal bound value.
Parameters
ObjectiveFunctionType
The objective function type of the problem.
Return
Example (Default Logic)
public override double GetInitialPrimalBound(ObjectiveFunctionType objectiveFunctionType)
{
double primalBound = 0;
if (objectiveFunctionType == ObjectiveFunctionType.Maximize)
{
primalBound = Double.NegativeInfinity;
}
else if (objectiveFunctionType == ObjectiveFunctionType.Minimize)
{
primalBound = Double.PositiveInfinity;
}
return primalBound;
}
GetInitialDualBound
public override double GetInitialDualBound(ObjectiveFunctionType objectiveFunctionType)
Definition
Returns the initial dual bound value.
Parameters
ObjectiveFunctionType
The objective function type of the problem.
Return
Example (Default Logic)
public virtual double GetInitialDualBound(ObjectiveFunctionType objectiveFunctionType)
{
double dualBound = 0;
if (objectiveFunctionType == ObjectiveFunctionType.Maximize)
{
dualBound = Double.PositiveInfinity;
}
else if (objectiveFunctionType == ObjectiveFunctionType.Minimize)
{
dualBound = Double.NegativeInfinity;
}
return dualBound;
}
UseAbsoluteOptimalityGap
public virtual bool UseAbsoluteOptimalityGap()
Definition
Whether to terminate the search based on the absolute duality gap (the absolute difference between the primal bound and dual bound), i.e., terminate the search if the absolute duality gap is below the set value.
Return
Boolean
True: Apply False: Do not apply (relative optimality gap will be applied)
False
If the return value is False, the relative duality gap is applied as a condition for terminating the search. (See the corresponding control)
Example (Default Logic)
public virtual bool UseAbsoluteOptimalityGap()
{
return false;
}
GetRelativeOptimalityGap
public virtual double GetRelativeOptimalityGap()
Definition
Sets the relative duality gap at which to stop exploration, i.e., if the relative duality gap value is below the set value, the exploration is terminated.
Return
Double
The relative duality gap, which is the condition for terminating the search.
0
Example (Default Logic)
public virtual double GetRelativeOptimalityGap()
{
return 0;
}
GetAbsoluteOptimalityGap
public virtual double GetAbsoluteOptimalityGap()
Definition
Sets the absolute duality gap at which to stop exploration, i.e., if the absolute duality gap value is below the set value, the exploration is terminated.
Return
Double
The absolute duality gap, which is the condition for terminating the search.
0
Example (Default Logic)
public virtual double GetAbsoluteOptimalityGap()
{
return 0;
}
GetDualBound
public virtual double GetDualBound(State state)
Definition
Returns the dual bound of the given state.
Parameters
State
The state to obtain dual bound.
Return
Double
Dual bound value of the state.
0
Example
public override double GetDualBound(State state)
{
double bound = 0;
CRPState crpState = state as CRPState;
bound = crpState.GetTotalColorCount() - 1;
return bound;
}
GetPrimalBound
public override double GetPrimalBound(Solution solution)
Definition
Returns the primal bound corresponding to the given feasible solution.
Parameters
Solution
The feasible solution to obtain primal bound.
Return
Example (Default Logic)
public override double GetPrimalBound(Solution solution)
{
return solution.Value;
}
GetPrimalSolutionUpdatePeriod
public override int GetPrimalSolutionUpdatePeriod()
Definition
Returns the state count interval to apply the logic to find the primal solution in the state. For example, if you set the interval to 1000, the logic will be applied to find the primal solution once every 1000 states.
Return
Integer
The frequency at which to apply the logic to find the primal solution.
1000
Example (Default Logic)
public override int GetPrimalSolutionUpdatePeriod()
{
return 1000;
}
GetDualBoundUpdatePeriod
public override int GetDualBoundUpdatePeriod()
Definition
Returns the state count interval to apply the logic to find the dual bound in the state. For example, if you set the interval to 1000, the logic will be applied to calculate the dual bound once every 1000 states.
Return
Integer
The frequency at which to apply the logic to calculate the dual bound.
1
Example (Default Logic)
public virtual int GetDualBoundUpdatePeriod()
{
return 1;
}
Last updated