kep_solver.solving module
- class RCVFStep(target, num_deactivated, time)
Bases:
objectA dataclass containing information about one step in using reduced cost variable fixing to solve an IP.
-
target:
int The target value for the IP at this step.
-
num_deactivated:
int The number of variables deactivated at this step.
-
time:
float How long the IP solve took at this particular step.
- __init__(target, num_deactivated, time)
-
target:
- class Level(num_variables, num_constraints, linear_value=None, rcvf_steps=None)
Bases:
objectDetails on the IP solving at one particular level of the objective hierarchy.
-
num_variables:
int How many variables are in the problem at this point.
-
num_constraints:
int How many constraints are in the problem at this point.
-
linear_value:
float|None= None What is the value of the linear relaxation at this point. Note that this is only properly calculated if one uses RCVF, otherwise a value of None is stored.
-
rcvf_steps:
list[RCVFStep] |None= None Contains details on how RCVF performed at each stage. If RCVF was never used, this value is just None.
- __init__(num_variables, num_constraints, linear_value=None, rcvf_steps=None)
-
num_variables:
- class TimeStep(description, time)
Bases:
objectDetails how long one particular step of a process took.
-
description:
str A description of the step in question.
- __init__(description, time)
-
time:
float How long this particular step took.
-
description:
- class SolvingStatistics(times, levels)
Bases:
objectA dataclass containing information relevant to the solving of particular problems.
- __init__(times, levels)
- class SolvingOptions(solver=<pulp.apis.coin_api.PULP_CBC_CMD object>, useRCVF=False)
Bases:
object- __init__(solver=<pulp.apis.coin_api.PULP_CBC_CMD object>, useRCVF=False)
-
solver:
LpSolver= <pulp.apis.coin_api.PULP_CBC_CMD object> What solver to use. The creation of the pulp LpSolver object also often includes solver-specific options.
-
useRCVF:
bool|list[bool] = False Either a single boolean denoting whether or not to use reduced cost variable fixing, or a list of booleans, one for each level of the objective hierarchy, such that for each level the corresponding boolean denotes whether to use reduced cost variable fixing. For more details on reduced cost variable fixing, see [Delorme23].
- useRCVFAtLevel(level)
Returns True if and only if RCVF should be used at this level.
- Parameters:
level (
int) – The corresponding lever of the objective hierarchy.- Return type:
bool