Export (0) Print
Expand All

Model.AddConstraint Method (String, String)

Solver Foundation 3.0

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Adds a constraint to a model by parsing an OML expression.

Namespace:  Microsoft.SolverFoundation.Services
Assembly:  Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)

public Constraint AddConstraint(
	string name,
	string expression
)

Parameters

name
Type: System.String
The name of the constraint.
expression
Type: System.String
The expression for the constraint.

Return Value

Type: Microsoft.SolverFoundation.Services.Constraint
A constraint for the model.

ExceptionCondition
ModelException

The model is not valid.

Show:
© 2015 Microsoft