Skip to content

Commit 9e4fc23

Browse files
committed
Use more verbose variable name.
1 parent 206f323 commit 9e4fc23

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pyomo/solvers/plugins/solvers/xpress_direct.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,14 +372,14 @@ class ChangeBranchObjectCallbackContext(CallbackContext):
372372
- `branchobject' [read/write]: The branching that will be executed.
373373
- `new_object()`: Create a new branching object.
374374
"""
375-
def __init__(self, problem, solver, var2idx, obranch):
375+
def __init__(self, problem, solver, var2idx, orig_branch):
376376
super(ChangeBranchObjectCallbackContext, self).__init__(problem, solver, var2idx)
377-
self._obranch = obranch
378-
self._branch = obranch
377+
self._orig_branch = orig_branch
378+
self._branch = orig_branch
379379
@property
380380
def orig_branchobject(self):
381381
"""The branching suggested by Xpress."""
382-
return self._obranch
382+
return self._orig_branch
383383
@property
384384
def branchobject(self):
385385
"""The branching that will be carried out.
@@ -507,8 +507,8 @@ def del_chgbranchobject(self, chgbranchobjectcb = None):
507507
"""Remove a specific or all (`chgbranchobjectcb` is `None`) chgbranchobject callbacks."""
508508
self._del_callback('chgbranchobject', prechgbranchobjectcb)
509509
def _chgbranchobject_wrapper(self, solver, var2idx):
510-
def wrapper(prob, cb, obranch):
511-
data = ChangeBranchObjectCallbackContext(prob, solver, var2idx, obranch)
510+
def wrapper(prob, cb, orig_branch):
511+
data = ChangeBranchObjectCallbackContext(prob, solver, var2idx, orig_branch)
512512
cb(data)
513513
return data.branchobject
514514
return wrapper

0 commit comments

Comments
 (0)