Skip to content

Commit

Permalink
added maxNodes option for CBC
Browse files Browse the repository at this point in the history
  • Loading branch information
pchtsp committed Oct 2, 2023
1 parent 2b6b5fa commit 5bbdc9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pulp/apis/coin_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(
logPath=None,
timeMode="elapsed",
mip_start=False,
maxNodes=None,
):
"""
:param bool mip: if False, assume LP even if integer variables
Expand All @@ -83,6 +84,7 @@ def __init__(
:param float maxSeconds: deprecated for timeLimit
:param str timeMode: "elapsed": count wall-time to timeLimit; "cpu": count cpu-time
:param bool mip_start: deprecated for warmStart
:param int maxNodes: max number of nodes during branching. Stops the solving when reached.
"""

if fracGap is not None:
Expand Down Expand Up @@ -124,6 +126,7 @@ def __init__(
gapAbs=gapAbs,
logPath=logPath,
timeMode=timeMode,
maxNodes=maxNodes,
)

def copy(self):
Expand Down Expand Up @@ -236,6 +239,7 @@ def getOptions(self):
strong="strong {}",
cuts="gomory on knapsack on probing on",
timeMode="timeMode {}",
maxNodes="maxNodes {}",
)

return [
Expand Down

0 comments on commit 5bbdc9f

Please sign in to comment.