Export (0) Print
Expand All

Model Class

Solver Foundation 3.0

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

Defines a model that has expressions and constraints.

System.Object
  Microsoft.SolverFoundation.Services.Model

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

'Declaration
Public NotInheritable Class Model

The Model type exposes the following members.

  NameDescription
Public propertyConstraintsGets a collection of constraints that are defined directly in a model.
Public propertyDecisionsGets a collection of decisions that are defined directly in a model.
Public propertyGoalsGets a collection of goals that are defined directly in a model.
Public propertyIsEmptyGets a value that indicates whether a model has no decisions, parameters, constraints, or goals.
Public propertyNameGets or sets the name of a model.
Public propertyParametersGets all parameters that are defined in a model.
Public propertyRandomParametersGets all random parameters that are defined in a model.
Public propertyRecourseDecisionsGets all recourse decisions that are defined in a model.
Public propertySubmodelInstancesGets all instantiations of submodels created directly in a model.
Public propertySubmodelsGets all submodels created directly in a model.
Public propertyTuplesGets all tuples that are defined in a model.
Top

  NameDescription
Public methodStatic memberAbsComputes the absolute value of a decision, formula, goal, or constraint.
Public methodAddConstraint(String, Term)Adds a constraint to the model..
Public methodAddConstraint(String, String)Adds a constraint to a model by parsing an OML expression.
Public methodAddConstraintsAdds a group of constraints to a model.
Public methodAddDecision(Decision)Adds a decision to a model.
Public methodAddDecision(RecourseDecision)Adds a recourse decision to a model (for stochastic programming).
Public methodAddDecisions(Decision())Adds a group of decisions to a model.
Public methodAddDecisions(RecourseDecision())Adds a group of recourse decisions to a model (for stochastic programming).
Public methodAddGoal(String, GoalKind, Term)Adds a goal to a model.
Public methodAddGoal(String, GoalKind, String)Adds a goal to a model by parsing an OML expression.
Public methodAddGoalsAdds a group of goals to a model.
Public methodAddParameter(Parameter)Adds a parameter to a model.
Public methodAddParameter(RandomParameter)Adds a random parameter to a model for stochastic programming.
Public methodAddParameters(Parameter())Adds a group of parameters to a model.
Public methodAddParameters(RandomParameter())Adds a group of random parameters to a model for stochastic programming.
Public methodAddTupleAdds a tuple to a model.
Public methodAddTuplesAdds a group of tuples to a model.
Public methodStatic memberAllDifferentEnsures that all terms in a model are different.
Public methodStatic memberAndPerforms a Boolean AND operation.
Public methodStatic memberArcCosComputes the arccosine of a term.
Public methodStatic memberArcSinComputes the arcsine of a term.
Public methodStatic memberArcTanComputes the arctangent of a term.
Public methodStatic memberAtMostMofNTests whether a maximum of m inputs are true.
Public methodStatic memberCeilingComputes the smallest integer that is greater than or equal to the argument.
Public methodStatic memberCosComputes the cosine of a term.
Public methodStatic memberCoshComputers the hyperbolic cosine
Public methodCreateInstanceCreates an instance of a model.
Public methodCreateSubModelCreates a submodel within the current model.
Public methodStatic memberDifferenceSubtracts one term from another term.
Public methodStatic memberEqual(Term())Tests all inputs for equality.
Public methodStatic memberEqual(Term(), Tuples)Tests a tuple for membership in an array of tuples.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodStatic memberExactlyMofNTests whether exactly a specified number of inputs are true.
Public methodStatic memberExpComputes e raised to the power specified by the input.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberFloorComputes the largest integer that is less than or equal to the argument.
Public methodStatic memberForEachCreates a term for each element.
Public methodStatic memberForEachWhereCreates a term for each element if a condition is met.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberGreaterTests whether all inputs occur in decreasing order.
Public methodStatic memberGreaterEqualTests whether all inputs are decreasing or equal in value.
Public methodStatic memberIfReturns the second or third argument, depending on whether the condition is true.
Public methodStatic memberImpliesTests for logical implication between two inputs.
Public methodStatic memberLessTests whether all inputs occur in increasing order.
Public methodStatic memberLessEqualTests whether all inputs are increasing or equal in value.
Public methodStatic memberLogComputes the natural logarithm of the term.
Public methodStatic memberLog10Computes the base 10 logarithm of the term.
Public methodStatic memberMaxReturns the largest argument.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberMinReturns the smallest argument.
Public methodStatic memberNegateComputes the arithmetic negation of a term.
Public methodStatic memberNotComputes the logical negation of a term.
Public methodStatic memberOrPerforms a logical OR operation on a term.
Public methodStatic memberPowerRaises a term to the power of a specified value.
Public methodStatic memberProductMultiplies all the inputs.
Public methodStatic memberQuotientDivides one term by another.
Public methodRemoveConstraintRemoves a constraint from a model.
Public methodRemoveDecision(Decision)Removes an unused decision from a model.
Public methodRemoveDecision(RecourseDecision)Removes an unused recourse decision from a model.
Public methodRemoveGoalRemoves a goal from a model.
Public methodRemoveGoalsRemoves goals from a model.
Public methodRemoveParameter(Parameter)Removes an unused parameter from a model.
Public methodRemoveParameter(RandomParameter)Removes an unused random parameter from a model.
Public methodRemoveSubModelRemoves a submodel from a model.
Public methodStatic memberSinComputes the sine for a term.
Public methodStatic memberSinhComputes the hyperbolic sine for a term.
Public methodStatic memberSos1Creates a constraint for a special ordered type 1 set.
Public methodStatic memberSos2Creates a constraint for a special ordered set reference row.
Public methodStatic memberSqrtComputes the square root for a term.
Public methodStatic memberSum(Term())Computes the sum of the inputs.
Public methodStatic memberSum(Term, Term)Computes the sum of the inputs.
Public methodStatic memberTanComputes the tangent for a term.
Public methodStatic memberTanhComputes the hyperbolic tangent for a term.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The Model class can be used to construct and modify models. You can add arithmetic and logical expressions to models. In addition, you can add constraints expressed over domains of Boolean, integer, and real variables.

The items that make up a Model object are Goals, Constraints, Parameters, and Decisions properties.

You can load, save, and solve models by using the SolverContext class.

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