ConstraintSystem.TryAddMinimizationGoals Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns a value that indicates whether terms were minimized successfully by the solver.
Namespace: Microsoft.SolverFoundation.Solvers
Assembly: Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)
Syntax
'Declaration
Public Function TryAddMinimizationGoals ( _
ParamArray goals As CspTerm() _
) As Boolean
public bool TryAddMinimizationGoals(
params CspTerm[] goals
)
public:
bool TryAddMinimizationGoals(
... array<CspTerm^>^ goals
)
member TryAddMinimizationGoals :
goals:CspTerm[] -> bool
public function TryAddMinimizationGoals(
... goals : CspTerm[]
) : boolean
Parameters
- goals
Type: array<Microsoft.SolverFoundation.Solvers.CspTerm[]
The goals to minimize.
Return Value
Type: System.Boolean
true if terms were minimized successfully by the solver; otherwise, false.
Remarks
If the solver is not given any goals, the solver tries to find all feasible solutions. If one term is specified, the solver finds all solutions equal to the best value of the goal. If more than one goal term is supplied, each term is considered only within the set of solutions satisfying the optimum of all preceding goals. If the TryAddMinimizationGoals method is called separately, terms are appended to the previously registered goals.
.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.