Initializing help system before first use

# problem.addnames

Purpose
This subroutine is deprecated and will be removed in a future release. Use problem.addNames instead.
Associates names with rows, columns, sets, piecewise linear constraints, general constraints or objectives.
Synopsis
`problem.addnames(type, names, first, last)`
Arguments

names | Array containing names.
type |
xpress.Namespaces.ROW | for row names;
xpress.Namespaces.COLUMN | for column names;
xpress.Namespaces.SET | for set names;
xpress.Namespaces.PWLCONS | for piecewise linear constraint names;
xpress.Namespaces.GENCONS | for general constraint names;
xpress.Namespaces.OBJECTIVE | for objective names.
first | Start of the range of rows, columns, sets, piecewise linear constraints, general constraints or objectives.
last | End of the range of rows, columns, sets, piecewise linear constraints, general constraints or objectives.

Example
Assign names to an array of constraints:

    p = xp.problem()
    x = p.addVariables(10)
    m = np.random.rand(10, 10)
    ctrs = xp.Dot(m, x) == 1
    first_ctr = prob.attributes.rows
    prob.addConstraint(ctrs)
    last_ctr = prob.attributes.rows - 1
    names = np.array(['ctr{}'.format(i) for i in range(len(ctrs))])
    p.addnames(xp.Namespaces.ROW, names, first_ctr, last_ctr)

Related topics
problem.addCols, problem.addRows, problem.getNameList, problem.addNames.
Parent Topic Deprecated functionality

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.