Model.AddGoal Method (String, GoalKind, String)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Adds a goal to a model by parsing an OML expression.
Namespace: Microsoft.SolverFoundation.Services
Assembly: Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)
Syntax
'Declaration
Public Function AddGoal ( _
name As String, _
direction As GoalKind, _
expression As String _
) As Goal
public Goal AddGoal(
string name,
GoalKind direction,
string expression
)
public:
Goal^ AddGoal(
String^ name,
GoalKind direction,
String^ expression
)
member AddGoal :
name:string *
direction:GoalKind *
expression:string -> Goal
public function AddGoal(
name : String,
direction : GoalKind,
expression : String
) : Goal
Parameters
- name
Type: System.String
The name of the goal.
- direction
Type: Microsoft.SolverFoundation.Services.GoalKind
The direction of a goal, such as minimize or maximize.
- expression
Type: System.String
An expression of a goal.
Return Value
Type: Microsoft.SolverFoundation.Services.Goal
A goal for the model.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.