Initializing help system before first use

XPRSnlpevaluateformula, XSLPevaluateformula

Purpose
Evaluate a formula using the current values of the variables
Topic area
Synopsis
int XPRSnlpevaluateformula(XPRSprob prob, int parsed, const int type[], const double values[], double *p_value);

int XSLPevaluateformula(XSLPprob prob, int parsed, const int type[], const double values[], double *p_value);
Arguments
prob 
The current problem.
parsed 
integer indicating whether the formula of the item is in internal unparsed format ( parsed=0) or parsed (reverse Polish) format ( parsed=1).
type 
Integer array of token types for the formula.
values 
Double array of values corresponding to type.
p_value 
Address of a double precision value to receive the result of the calculation.
Example
The following example calculates the value of column 3 divided by column 6.
int n, type[10];
double value, values[10];

n = 0;
type[n] = XPRS_TOK_COL; values[n++] = 3;
type[n] = XPRS_TOK_COL; values[n++] = 6;
type[n] = XPRS_TOK_OP;  values[n++] = XPRS_OP_DIVIDE;
type[n++] = XPRS_TOK_EOF;

XPRSnlpevaluateformula(prob, 1, type, values, &value);

Further information
1. The formula in type must be terminated by an XPRS_TOK_EOF token.
2. The formula cannot include "complicated" functions, such as user functions which return more than one value
Related topics

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