branchobj.addrows
| branchobj.addrows | 
  Purpose
 
  Adds new constraints to a branch of a user branching object.
 
  Synopsis
 
 branchobj.addrows (ibranch, rtype, rhs, beg, mcol, val) 
 
  Arguments
 
| 
     ibranch 
     | 
     The number of the branch to add the new constraints for. This branch must already have been created using
     branchobj.addbranches. Branches are indexed starting from zero.
     | ||||||
| 
     rtype 
     | 
     Character array of length
     nrows indicating the type of constraints to add:
     
 | ||||||
| 
     rhs 
     | 
     Array of length
     nrows containing the right hand side values.
     | ||||||
| 
     beg 
     | 
     Array of length
     nrows containing the offsets of the
     mcol and
     dval arrays of the start of the non zero coefficients in the new constraints.
     | ||||||
| 
     mcol 
     | 
     Array of length
     nelems containing the column indices for the non zero coefficients.
     | ||||||
| 
     dval 
     | 
     Array of length
     nelems containing the non zero coefficient values.
     | 
  Example
 
 The following function will create a branching object that branches on constraints
 x1 + x2 ≥ 1 or
 x1 + x2 ≤ 0:
 
def CreateConstraintBranch (mip, icol):
    # Create the new object with two empty branches.
    bo = xpress.branchobj (mip, isoriginal = True)
    bo.addbranches (2)
    # Add the constraint of the branching object:
    # x1 + x2 >= 1
    # x1 + x2 <= 0
    bo.addrows (0, 1, 2, ['G'], [1.0], [0], [0,1], [1.0,1.0])
    bo.addrows (1, 1, 2, ['L'], [0.0], [0], [0,1], [1.0,1.0])
    # Set a low priority value so our branch object is picked up
    # before the default branch candidates.
    bo.setpriority (100)
    return bo
 
