Functions
Equation Constraints

Functions

nativeCode ConsEquationmdlConsEquation_create (ConsEquation *pThis, bool isCheck)
 
mdlConsEquation_create initializes a constraint equation data structure, making it

ready for the parsing step. More...

 
nativeCode int mdlConsEquation_parse (ConsEquation *pThis, WCharCP str)
 
mdlConsEquation_parse parses the specified algebraic expression and detects

syntax errors. More...

 
nativeCode int mdlConsEquation_resolve (ConsEquation *pThis, ConsModel *pModel)
 
mdlConsEquation_resolve looks in the specified constraint model for the

constraint parameter objects to which the equation refers by name. More...

 
nativeCode int mdlConsEquation_gen (ConsEquation *pThis)
 mdlConsEquation_gen activates an equation constraint. More...
 

Detailed Description

Function Documentation

nativeCode ConsEquation* mdlConsEquation_create ( ConsEquation pThis,
bool  isCheck 
)

mdlConsEquation_create initializes a constraint equation data structure, making it

ready for the parsing step.

Parameters
[out]pThisis the storage to be filled out.
[in]isCheckis this a post-check?
Returns
mdlConsEquation_create returns this.
See also
mdlConsEquation_parse mdlConsEquation_resolve mdlConsEquation_gen
Remarks
Required Library: mdlbltin.lib
nativeCode int mdlConsEquation_gen ( ConsEquation pThis)

mdlConsEquation_gen activates an equation constraint.

An equation cannot be activated if it has not already been successfully parsed and resolved.

Parameters
[out]pThisis the parsed and resolved equation constraint to activate.
Returns
mdlConsEquation_gen returns ERROR if this could not be activated (because of parsing or resolution errors); otherwise, SUCCESS.
See also
mdlConsEquation_create mdlConsEquation_parse mdlConsEquation_resolve
Remarks
Required Library: mdlbltin.lib
nativeCode int mdlConsEquation_parse ( ConsEquation pThis,
WCharCP  str 
)

mdlConsEquation_parse parses the specified algebraic expression and detects

syntax errors.

Syntax errors must be fixed before the equation constraint can be resolved and activated.

Parameters
[out]pThisis the initialized constraint equation data structure. It is updated to hold the results of the parse. In particular, if there is a parsing error, the parse.errStr member will describe the offending token.
[in]stris a NULL-terminated string containing the expression to be parsed.
Returns
mdlConsEquation_parse returns SUCCESS if no syntax errors were encountered; ERROR otherwise.
See also
mdlConsEquation_create mdlConsEquation_resolve mdlConsEquation_gen
Remarks
Required Library: mdlbltin.lib
nativeCode int mdlConsEquation_resolve ( ConsEquation pThis,
ConsModel pModel 
)

mdlConsEquation_resolve looks in the specified constraint model for the

constraint parameter objects to which the equation refers by name.

mdlConsEquation_resolve fails if any parameter cannot be found in the model. All references must be resolved before the equation constraint can be activated.

Parameters
[out]pThisis the parsed equation constraint to be resolved. It is updated with the results of the resolve step. In particular, if a constraint parameter cannot be found, its name is placed in parse.errStr.
[in]pModelis the Constraint Model in which Constraint Parameters are to be found.
Returns
mdlConsEquation_resolve returns SUCCESS if all references to Constraint Parameters are resolved; ERROR otherwise.
See also
mdlConsEquation_create mdlConsEquation_parse mdlConsEquation_gen
Remarks
Required Library: mdlbltin.lib

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.