ConstraintSystem Class

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

Defines how to create and solve models.

Inheritance Hierarchy

System.Object
  Microsoft.SolverFoundation.Solvers.ConstraintSystem

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

Syntax

'Declaration
Public NotInheritable Class ConstraintSystem _
    Implements ISolver, IReportProvider
public sealed class ConstraintSystem : ISolver, 
    IReportProvider
public ref class ConstraintSystem sealed : ISolver, 
    IReportProvider
[<Sealed>]
type ConstraintSystem =  
    class
        interface ISolver
        interface IReportProvider
    end
public final class ConstraintSystem implements ISolver, IReportProvider

The ConstraintSystem type exposes the following members.

Properties

  Name Description
Public property AbortDomainNarrowing Returns a value that indicates whether the solver is being requested to stop or has already stopped.
Public property BacktrackCount Gets the number of backtracks during a search.
Public property Constraints Gets the collection of constraint functions added to a solver.
Public property DefaultBoolean Gets a Boolean domain that contains 0 (false) and 1 (true).
Public property DefaultInterval Gets a domain that represents the minimum to maximum finite values supported by a solver.
Public property Empty Gets a domain with the empty set.
Public property False Gets the Boolean CspTerm {false}.
Public property GoalCount Gets the number of minimization goals.
Public property IsEmpty Returns a value that indicates whether a model in a solver is empty.
Public property IsInterrupted Returns a value that indicates whether the last solve operation was interrupted.
Public propertyStatic member MaxFinite Gets the maximum integer value for the CSP solver.
Public propertyStatic member MinFinite Gets the minimum integer value for a CSP solver.
Public property MinimizationGoals Gets the collection of constraint functions that have been added to a solver.
Public property Mode Gets or sets the debug mode for a solver.
Public property Parameters Gets a set of parameters with default values and a callback function to query about cancelling the solve process.
Public property Precision Gets the global precision setting for real values in a solver.
Public property QueryAbort A function that is called periodically through the computation to determine if the user has cancelled the operation.
Public property True Gets the Boolean CspTerm {true}.
Public property Variables Gets the collection of variables that have been instantiated for a solver.
Public propertyStatic member Version Gets the version of a solver.

Top

Methods

  Name Description
Public method Abs Computes the absolute value.
Public method AddConstraints Returns a value that indicates whether all constraint functions added to a model are valid.
Public method And Performs a Boolean AND operation.
Public method AtMostMofN Tests that at most M inputs are true.
Public method Constant(Double) Gets a term for the immutable real value k with double precision.
Public method Constant(Int32) Gets a term for the immutable value k.
Public method Constant(Int32, Double) Gets a term for the immutable real value k.
Public method Constant(CspDomain, String) Gets a term for the immutable symbol value k.
Public method CreateBoolean() Creates a Boolean variable with an auto-generated key.
Public method CreateBoolean(Object) Creates a Boolean variable with a true or false initial value.
Public method CreateBooleanArray Creates a two-level array of Boolean variable terms in a domain.
Public method CreateBooleanVector Creates a vector of Boolean variable terms in a domain.
Public method CreateComposite() Creates an empty composite with an auto-generated key.
Public method CreateComposite(Object) Creates an empty composite that can have fields added.
Public method CreateDecimalInterval Creates a domain of a real interval with double precision.
Public method CreateDecimalSet(array<Double[]) Creates a domain of allowed real values with default precision in strictly ascending order.
Public method CreateDecimalSet(array<Double[], Int32, Int32) Creates a domain of allowed real values with default precision in strictly descending order.
Public method CreateIntegerInterval Creates an integer domain.
Public method CreateIntegerSet(Int32()) Creates a domain of allowed integer values in strictly ascending order.
Public method CreateIntegerSet(Int32(), Int32, Int32) Create a domain of allowed integer values in strictly descending order.
Public methodStatic member CreateSolver() Creates an instance of a solver.
Public methodStatic member CreateSolver(ISolverEnvironment) Creates an instance of a solver.
Public methodStatic member CreateSolver(Func<TResult>, Void, Boolean) Creates an instance of the solver.
Public method CreateSymbolSet Creates a domain of symbols.
Public method CreateVariable(CspComposite) Creates a composite variable with an auto-generated key.
Public method CreateVariable(CspDomain) Creates a finite variable with a given domain and auto-generated key.
Public method CreateVariable(CspComposite, Object) Creates a composite variable with the specified domain and key.
Public method CreateVariable(CspDomain, Object) Creates a finite variable with the specified domain and key.
Public method CreateVariableArray Creates a two-level array of finite variable terms in a domain.
Public method CreateVariableVector(CspComposite, Object, Int32) Creates a vector of finite variable terms in a composite domain.
Public method CreateVariableVector(CspDomain, Object, Int32) Creates a vector of finite variable terms in a domain.
Public method Equal(array<CspTerm[]) Tests if all inputs are equal.
Public method Equal(Int32, array<CspTerm[]) Tests if all inputs are equal to a constant.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method ExactlyMofN Tests if exactly M of the inputs are true.
Public method FilteredSum Adds the conditional inputs.
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 GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetReport Generate a report.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Greater(array<CspTerm[]) Returns a value that indicates whether each input is greater than the following input.
Public method Greater(Int32, array<CspTerm[]) Returns a value that indicates whether a constant is greater than each input.
Public method GreaterEqual(array<CspTerm[]) Returns a value that indicates whether each input is greater than or equal to the following input.
Public method GreaterEqual(Int32, array<CspTerm[]) Returns a value that indicates whether a constant is greater than or equal to the input.
Public method Implies Tests for logical implication between two inputs.
Public method Index(array<CspTerm[], CspTerm) Returns the value of the inputs[index].
Public method Index(array<CspTerm[], array<CspTerm[]) Returns the input value selected by the keys.
Public method Index(array<CspTerm[], CspTerm, CspDomain) Returns the value of the inputs[index].
Public method Index(array<CspTerm[], array<CspTerm[], array<CspDomain[]) Returns the value of the input selected by the keys.
Public method Index(array<array<CspTerm[][], CspTerm, CspTerm) Returns the value of the inputs[row][column].
Public method Index(array<array<CspTerm[][], CspTerm, Int32) Returns the value of the inputs[row][column].
Public method Index(array<array<CspTerm[][], Int32, CspTerm) Returns the value of the inputs[row][column].
Public method Index(array<array<CspTerm[][], CspTerm, CspTerm, CspDomain, CspDomain) Returns the value of the [row][column] input.
Public method IsElementOf Returns a value that indicates if an input is a member of a domain.
Public method Less(array<CspTerm[]) Returns a value that indicates if an input is less than the following input.
Public method Less(Int32, array<CspTerm[]) Returns a value that indicates if an input is less than a constant.
Public method LessEqual(array<CspTerm[]) Returns a value that indicates if an input is less than or equal to the following input.
Public method LessEqual(Int32, array<CspTerm[]) Returns a value that indicates if an input is less than or equal to a constant.
Public method Max Returns the maximum of the inputs.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Min Returns the minimum of the inputs.
Public method Neg Negates the input.
Public method Not Performs the Boolean inverse of the input.
Public method Or Performs the Boolean OR of the inputs.
Public method Power Raises an input to the power of a specified value.
Public method Product Returns the product of the inputs.
Public method RemoveAllMinimizationGoals
Public method RemoveConstraints
Public method ResetSolver Resets the solver state.
Public method Save Writes the report.
Public method Shutdown Shuts down the instance of a ConstraintSystem object.
Public method Solve() Solves a model by using the default solver parameters.
Public method Solve(ISolverParameters) Solves a model by using the given solver parameters.
Public method Sum Adds the inputs.
Public method SumProduct Performs the sum of the pairwise-product of the inputs.
Public method TableDecimal Creates a relation constraint by using the column variables and inputs.
Public method TableDomain(array<CspTerm[], array<array<CspDomain[][]) Creates a relation constraint by using the column variables and inputs.
Public method TableDomain(array<CspTerm[], IEnumerable<IEnumerable<CspDomain>>) Creates a relation constraint by using the column variables and inputs.
Public method TableInteger Creates a relation constraint by using the column variables and inputs.
Public method TableSymbol Creates a relation constraint by using the column variables and inputs.
Public method TableTerm(array<CspTerm[], array<array<CspTerm[][]) Creates a relation constraint by using the column variables and inputs.
Public method TableTerm(array<CspTerm[], IEnumerable<IEnumerable<CspTerm>>) Creates a relation constraint by using the column variables and inputs.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryAddMinimizationGoals Returns a value that indicates whether terms were minimized successfully by the solver.
Public method TryGetVariableFromKey Returns a value that indicates whether a variable is retrieved by its key.
Public method Unequal(array<CspTerm[]) Returns a value that indicates if every pairing of the inputs is unequal.
Public method Unequal(Int32, array<CspTerm[]) Returns a value that indicates if every input is unequal to a constant.

Top

Extension Methods

  Name Description
Public Extension Method Cardinality Counts the number of elements in a set variable. (Defined by CspSetOperators.)
Public Extension Method Concatenation Concatenates two input list variables. (Defined by CspListOperators.)
Public Extension Method ConstantDecimalList Creates a constant decimal list. (Defined by CspListOperators.)
Public Extension Method ConstantDecimalSet Creates a constant decimal set. (Defined by CspSetOperators.)
Public Extension Method ConstantIntegerList Creates a constant integer list. (Defined by CspListOperators.)
Public Extension Method ConstantIntegerSet Creates a constant integer set. (Defined by CspSetOperators.)
Public Extension Method ConstantSymbolList Creates a constant symbol list. (Defined by CspListOperators.)
Public Extension Method ConstantSymbolSet Creates a constant symbol set. (Defined by CspSetOperators.)
Public Extension Method CreatePowerList Creates a power list to use as the domain for baseline. (Defined by CspListOperators.)
Public Extension Method CreatePowerSet Creates a power set to use as the domain for baseline. (Defined by CspSetOperators.)
Public Extension Method Difference Computes the difference between two sets. (Defined by CspSetOperators.)
Public Extension Method ElementAt Creates a term that indicates whether the value of listVar[index] is equal to elementToBe. (Defined by CspListOperators.)
Public Extension Method ElementCount Counts the frequency of an element in a list. (Defined by CspListOperators.)
Public Extension Method FirstOccurrence Creates a term that indicates whether the first occurrence of element in listVar is equal to indexToBe. (Defined by CspListOperators.)
Public Extension Method Intersection Computes the intersection between two sets. (Defined by CspSetOperators.)
Public Extension Method LastOccurrence Creates a term that indicates whether the last occurrence of element in listVar is equal to indexToBe. (Defined by CspListOperators.)
Public Extension Method Length Measures the length of a list variable. (Defined by CspListOperators.)
Public Extension Method ListEqual(Int32(), CspTerm) Overloaded. Creates a term that indicates whether a list is equal to a list variable. (Defined by CspListOperators.)
Public Extension Method ListEqual(CspTerm, CspTerm) Overloaded. Creates a term that indicates whether two list variables are equal. (Defined by CspListOperators.)
Public Extension Method ListEqual(CspTerm, Int32()) Overloaded. Creates a term that indicates whether a list variable is equal to a list. (Defined by CspListOperators.)
Public Extension Method MemberOf(Int32, CspTerm) Overloaded. Creates a term that indicates whether a value is a member of a set variable. (Defined by CspSetOperators.)
Public Extension Method MemberOf(CspTerm, CspTerm) Overloaded. Creates a term that indicates whether a value is a member of a set variable. (Defined by CspSetOperators.)
Public Extension Method MemberOf(CspTerm, Int32()) Overloaded. Creates a term that indicates whether a value is a member of a set. (Defined by CspSetOperators.)
Public Extension Method SetEqual(Int32(), CspTerm) Overloaded. Creates a term that indicates whether a set is equal to a set variable. (Defined by CspSetOperators.)
Public Extension Method SetEqual(CspTerm, CspTerm) Overloaded. Creates a term that indicates whether two set variables are equal. (Defined by CspSetOperators.)
Public Extension Method SetEqual(CspTerm, Int32()) Overloaded. Creates a term that indicates whether a set variable is equal to a set. (Defined by CspSetOperators.)
Public Extension Method SublistEq(Int32(), CspTerm) Overloaded. Creates a term that indicates if a list if a subset of a list variable. (Defined by CspListOperators.)
Public Extension Method SublistEq(CspTerm, CspTerm) Overloaded. Creates a term that indicates if a list variable is a subset of another list variable. (Defined by CspListOperators.)
Public Extension Method SublistEq(CspTerm, Int32()) Overloaded. Creates a term that indicates if a list variable is a subset of another list. (Defined by CspListOperators.)
Public Extension Method SubsetEq(Int32(), CspTerm) Overloaded. Creates a term that indicates if a set if a subset of a set variable. (Defined by CspSetOperators.)
Public Extension Method SubsetEq(CspTerm, CspTerm) Overloaded. Creates a term that indicates if a set variable is a subset of another set variable. (Defined by CspSetOperators.)
Public Extension Method SubsetEq(CspTerm, Int32()) Overloaded. Creates a term that indicates if a set variable is a subset of another set. (Defined by CspSetOperators.)
Public Extension Method Union Creates a term that represents the union of two sets. (Defined by CspSetOperators.)

Top

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.Solvers Namespace