Initializing help system before first use

# problem.getGenCons

Purpose
Returns the general constraints y = f(x1, ..., xn, c1, ..., cm) in a given range.
Topic areas
Problem Information, Piecewise Linear and General Constraints, Optimizer
Synopsis
`contype, resultant, colstart, colind, valstart, val = problem.getGenCons(first=0, last=GENCONS-1)`
Arguments

first: int | First general constraint in the range.
last: int | Last general constraint in the range.

Return value

contype: list[GenConsType] | An integer array of length last-first+1 containing the types of the general constraints:
xpress.GenConsType.MAX (0) | indicates a maximum constraint;
xpress.GenConsType.MIN (1) | indicates a minimum constraint;
xpress.GenConsType.AND (2) | indicates an and constraint.
xpress.GenConsType.OR (3) | indicates an or constraint;
xpress.GenConsType.ABS (4) | indicates an absolute value constraint.
resultant: list[int] | Integer array containing the indices of the output variables y.
colstart: list[int] | Integer array of length last-first+2 containing the start index of each general constraint in the colind array.
colind: list[int] | Integer array containing the indices of the input variables xi.
valstart: list[int] | Integer array of length last-first+2 containing the start index of each general constraint in the val array.
val: list[float] | Integer array containing the constant values ci.

Further information
This function cannot be called while the current problem is being solved or when it is in an interrupted state. Use problem.postSolve to restore the problem to a non-solving state.
Related topics
problem.addGenCons, problem.delGenCons.
Parent Topic Xpress problem object methods

© 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.