Initializing help system before first use

problem.getpwlcons

problem.getpwlcons


Purpose
Returns the piecewise linear constraints y = f(x) in a given range.
Synopsis
npoints = problem.getpwlcons(col, resultant, start, xval, yval, size, first, last);
Arguments
col 
Integer array which will be filled with the indices of the input variables x. It must be of length at least last-first+1. May be None if not required.
resultant 
Integer array which will be filled with the indices of the output variables y. It must be of length at least last-first+1. May be None if not required.
start 
Integer array which will be filled with the start indices of the different constraints in the breakpoint arrays. It must be of length at least last-first+1. The x-values of the breakpoints of piecewise linear constraint i < last will be given in xval[start[i]] to xval[start[i+1]]. May be None if not required.
xval 
Double array of length sizewhich will be filled with the x-values of the breakpoints. May be None if not required.
yval 
Double array of length sizewhich will be filled with the y-values of the breakpoints. May be None if not required.
size 
Maximum number of breakpoints to be retrieved.
first 
First piecewise linear constraint in the range.
last 
Last piecewise linear constraint in the range.
npoints 
The returned number of breakpoints in the xval and yval arrays. If the number of breakpoints is greater than size, then only size elements will be returned.
Example
The following example retrieves all variables and breakpoints in the first two piecewise linear constraints:
col, resultant, start, xval, yval = [], [], [], [], []
npoints = prob.getpwlcons(prob, col, resultant, start, xval, yval, 1e9, 0, 1)
Further information
It is possible to obtain just the number of breakpoints in the range of piecewise linear constraints by calling this function with size set to 0, in which case the required size for the breakpoint arrays will be returned in npoints.
Related topics

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