evaluateConstraint

www.kxcad.net Home > CAE Software Index > MATLAB Index >


Your Ad Here

Evaluate optimization constraints

Syntax

Y = evaluateConstraint(optimstore, X)

Description

A method of cgoptimstore.

Y = evaluateConstraint(optimstore, X) evaluates all of the optimization constraints at the free variable values X. X must be a (NPoints-by-NFreeVar) matrix where NPoints is the number of points to be evaluated and NFreeVar is the number of free variables in the optimization. The values of the constraints are returned in Y, which is of size (NPoints-by-NItems) where NItems is the number of constraints in the optimization. The evaluation of Y is scaled approximately onto [-1 1]. Negative values of Y imply X is feasible.

Examples

Y = evaluateConstraint(optimstore, X, itemnames)

evaluates the constraints specified in the cell array of strings, itemnames, at the free variable values X. The values of the constraints are returned in Y, which is of size (NPoints-by-NItems) where NItems is the number of objectives listed in itemnames.

[Y, YG] = evaluateConstraint(optimstore, X, itemnames)

also evaluates the gradient of the specified constraints in YG (if itemnames is not specified, then the gradient of all constraints is returned). YG is of size NFreeVar-by-NItems-by-NPoints, where NFreeVar is the number of free variables in the optimization.

See Also

evaluateObjective, evaluateNonlcon

  


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments

Your Ad Here