Export (0) Print
Expand All

LinearModel 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.]

Represents a linear model with rows and variables.

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

public class LinearModel : RowVariableModel, 
	ILinearModel, ISolverProperties

The LinearModel type exposes the following members.

  NameDescription
Public methodLinearModelInitializes a new instance of the LinearModel class.
Top

  NameDescription
Public propertyCoefficientCountGets the number of non-zero coefficients in a linear model.
Public propertyGoalCountGets the number of goals in a linear model.
Public propertyGoalsGets the goal collection of a linear model.
Public propertyIndicesGets the collection of row and variable indexes for a model. (Inherited from RowVariableModel.)
Public propertyIntegerIndexCountGets the number of integer variables in a model. (Inherited from RowVariableModel.)
Public propertyIsMipModelGets a value that indicates whether a model is a mixed integer programming (MIP) model. (Inherited from RowVariableModel.)
Public propertyIsQuadraticModelGets a value that indicates whether a model has a quadratic term on the objective function.
Public propertyIsSpecialOrderedSetGets a value that indicates whether a linear model is a special ordered set.
Public propertyKeyComparerGets the object that is used to compare keys for rows or variables. (Inherited from RowVariableModel.)
Public propertyKeyCountGets the number of keys that are in a model. (Inherited from RowVariableModel.)
Public propertyKeysGets the variable key and row key collection. (Inherited from RowVariableModel.)
Public propertyRowCountGets the number of rows in a model. (Inherited from RowVariableModel.)
Public propertyRowIndicesGets the collection of row indexes of a linear model. (Overrides RowVariableModel.RowIndices.)
Public propertyRowKeysGets the collection of row keys. (Inherited from RowVariableModel.)
Public propertyVariableCountGets the number of variables in a model. (Inherited from RowVariableModel.)
Public propertyVariableIndicesGets the collection of variable indexes. (Inherited from RowVariableModel.)
Public propertyVariableKeysGets the collection of variable keys. (Inherited from RowVariableModel.)
Top

  NameDescription
Public methodAddGoalCreates an ILinearGoal object and adds it to the goal list in a model.
Public methodAddRow(Object, Int32)Adds a row to a linear model. (Overrides RowVariableModel.AddRow(Object, Int32).)
Public methodAddRow(Object, SpecialOrderedSetType, Int32)Adds a reference row for a special ordered set to a linear model.
Public methodAddVariableAdds a user variable to a model. (Inherited from RowVariableModel.)
Public methodClearGoalsClears all the goals in a linear model.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
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 methodGetBasicReturns a value that indicates whether a variable is a basic variable.
Public methodGetBoundsReturns the bounds for a variable. (Inherited from RowVariableModel.)
Public methodGetCoefficient(Int32, Int32)Returns the coefficient of the A matrix in a linear model.
Public methodGetCoefficient(Int32, Int32, Int32)Returns the coefficient of the Q matrix on the objective row.
Public methodGetGoalFromIndexReturns a goal entry if the row index is associated with a goal.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetIgnoreBoundsReturns a value that indicates whether the bounds of a variable are ignored. (Inherited from RowVariableModel.)
Public methodGetIndexFromKeyReturns the index that is associated with a specified key. (Inherited from RowVariableModel.)
Public methodGetIntegralityReturns a value that indicates whether a variable is an integer variable. (Inherited from RowVariableModel.)
Public methodGetKeyFromIndexReturns the key that is associated with the specified variable index. (Inherited from RowVariableModel.)
Public methodGetPropertyReturns the value of a property that is at the specified index. (Inherited from RowVariableModel.)
Public methodGetRowEntriesReturns the collection of non-zero variable entries.
Public methodGetRowEntryCountReturns the number of non-zero coefficients for the given row index.
Public methodGetRowQuadraticEntriesReturns a collection of non-zero variable entries on a quadratic row.
Public methodGetSpecialOrderedSetTypeRowIndexesReturns a list of rows for a special ordered set.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetValueReturns the value that is associated with the specified variable index. (Inherited from RowVariableModel.)
Public methodGetValueStateReturns the value state for a variable.
Public methodGetVariableEntriesReturns a collection of non-zero column entries.
Public methodGetVariableEntryCountReturns the number of non-zero coefficients for a given column variable index.
Protected methodInitModelAllocates data structures for a new model.
Public methodIsGoal(Int32)Returns a value that indicates whether a row identifier is a goal row.
Public methodIsGoal(Int32, ILinearGoal)Returns a value that indicates whether a row identifier is a goal row.
Public methodIsQuadraticVariableReturns a value that indicates whether a variable is in any quadratic row.
Public methodIsRowReturns a value that indicates whether a variable index corresponds to a row. (Inherited from RowVariableModel.)
Public methodLoadLinearModelLoads the information from one linear model into another model.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodPreallocateAllocates data structures for a new linear model.
Public methodRemoveGoalRemoves a goal row.
Public methodSetBasicSets the basic status for a variable.
Public methodSetBoundsSets the bounds for a row. (Inherited from RowVariableModel.)
Public methodSetCoefficient(Int32, Int32, Rational)Sets the coefficient of the A matrix in a linear model.
Public methodSetCoefficient(Int32, Rational, Int32, Int32)Sets the coefficient of the Q matrix on the objective row.
Public methodSetIgnoreBoundsSpecifies whether the bounds of a variable should be respected or ignored during a solve attempt. (Inherited from RowVariableModel.)
Public methodSetIntegralitySpecifies whether a variable is an integer variable. (Inherited from RowVariableModel.)
Public methodSetLowerBoundSets the lower bound of a variable. (Inherited from RowVariableModel.)
Public methodSetPropertySets a property that is at the specified variable index. (Inherited from RowVariableModel.)
Public methodSetUpperBoundSets the upper bound of a variable. (Inherited from RowVariableModel.)
Public methodSetValueSets the value for the specified variable index. (Inherited from RowVariableModel.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTryGetIndexFromKeyAttempts to return the variable index that is associated with the specified key. (Inherited from RowVariableModel.)
Top

  NameDescription
Protected fieldm_cvidBasicRepresents the number of variables that are marked as basic.
Protected fieldm_cvidIntRepresents the number of integer variables. (Inherited from RowVariableModel.)
Protected fieldm_mpkeyvidRepresents the mapping from key to variable index. (Inherited from RowVariableModel.)
Protected fieldm_qpRowVarThe goal variable that has the QP form.
Top

Rows and variables for a linear model are identified by a key that can be any object. Rows and variables can be accessed by an index. Indexes are not necessarily contiguous.

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