Share via


Decision Class

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

A group of decisions for which a solver finds values.

Inheritance Hierarchy

System.Object
  Microsoft.SolverFoundation.Services.Term
    Microsoft.SolverFoundation.Services.Decision

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

Syntax

'Declaration
Public NotInheritable Class Decision _
    Inherits Term
public sealed class Decision : Term
public ref class Decision sealed : public Term
[<Sealed>]
type Decision =  
    class
        inherit Term
    end
public final class Decision extends Term

The Decision type exposes the following members.

Constructors

  Name Description
Public method Decision(Domain, String) Initializes a new instance of the Decision class.
Public method Decision(Domain, String, array<Set[]) Initializes a new instance of the Decision class.

Top

Properties

  Name Description
Public property Binding Gets or sets the LINQ binding to a database.
Public property Description Gets or sets a comment for the decision object.
Public property IndexSets Gets the index sets for the decision object.
Public property Item Gets the indexes by one or more values.
Public property Name Gets the name of the decision.

Top

Methods

  Name Description
Public method CreateBinding Creates a DecisionBinding wrapping for the decision.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetDouble Converts an indexed value to a double.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetString Retrieves a sequence of elements for the decision.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValues Retrieves a sequence of (value, indexes) elements for this decision.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetBinding<T>(IEnumerable<T>, String) Initializes a new instance of the Decision class.
Public method SetBinding<T>(IEnumerable<T>, String, array<String[]) Initializes a new instance of the Decision class.
Public method SetIndexSet Resets the specified index set.
Public method SetInitialValue Provides a value that is close to the optimal value of the decision.
Public method ToDouble Converts a value to a double.
Public method ToString() Converts the decision to its equivalent string representation. (Overrides Object.ToString().)
Public method ToString(IFormatProvider) Converts the decision to its equivalent string representation.
Public method ToString(String, IFormatProvider) Converts the decision to its equivalent string representation. (Overrides Term.ToString(String, IFormatProvider).)

Top

Extension Methods

  Name Description
Public Extension Method GetValuesByFirstIndex Returns the values for a decision that has two index sets. (Defined by BindingUtilities.)
Public Extension Method GetValuesByIndex Returns the values for a decision with a single index sets. (Defined by BindingUtilities.)

Top

Remarks

Decisions are output variables determined by a solver. All decisions have a domain that determine the range of acceptable values. The decision may be a single value (scalar), or multiple values (a table). To create a single-value decision, pass in a zero-length indexSets array. If indexSets has nonzero length, each element of it represents a set of values which this decision is indexed by. For example, if there are two index sets, then this decision takes two indexes, one from the first set and one from the second set. The total number of decisions is the product of the sizes of all the index sets.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SolverFoundation.Services Namespace