Represents an optimization problem.
SystemObject Extreme.Mathematics.OptimizationOptimizationModel Extreme.Mathematics.OptimizationLinearProgram Extreme.Mathematics.OptimizationNonlinearProgram
Namespace:
Extreme.Mathematics.Optimization
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public abstract class OptimizationModel
Public MustInherit Class OptimizationModel
public ref class OptimizationModel abstract
[<AbstractClassAttribute>]
type OptimizationModel = class end
The OptimizationModel type exposes the following members.
 Name  Description 

 OptimizationModel(FuncString, DecisionVariable) 
Constructs a new OptimizationModel object.

 OptimizationModel(FuncString, DecisionVariable, MatrixDouble, VectorDouble) 
Constructs an optimization model with linear constraints in standard form.

 OptimizationModel(FuncString, DecisionVariable, MatrixDouble, VectorDouble, Int32) 
Constructs an optimization model with linear constraints in standard form.

 OptimizationModel(FuncString, DecisionVariable, MatrixDouble, VectorDouble, VectorDouble, VectorDouble, VectorDouble) 
Constructs an optimization model with linear constraints in standard form.

Top
 Name  Description 

 Constraints 
Gets the collection of constraints for this OptimizationModel.

 ExtremumType 
Gets or sets whether a minimum or a maximum should be computed.

 Name 
Gets or sets the name of the model.

 OptimalValue 
Gets the extreme value of the cost function.

 SolutionReport 
Gets an object that contains information about the solution of the model.

 Status 
Gets the status of the optimization model's solution.

 Variables 
Gets the collection of variables for this OptimizationModel.

Top
 Name  Description 

 AddBinaryVariable 
Adds a binary variable to the collection.

 AddIntegerVariable(String) 
Adds an integer variable to the collection.

 AddIntegerVariable(String, Int32, Int32) 
Adds a binary variable to the collection.

 AddLinearConstraint(String, ConstraintType, Double) 
Adds a linear constraint to the optimization model.

 AddLinearConstraint(String, Double, Double) 
Adds a linear constraint to the optimization model.

 AddLinearConstraint(IListDecisionVariable, IListDouble, ConstraintType, Double) 
Adds a linear constraint to the optimization model.

 AddLinearConstraint(String, IListDouble, ConstraintType, Double) 
Adds a linear constraint to the optimization model.

 AddLinearConstraint(String, IListDouble, Double, Double) 
Adds a linear constraint to the optimization model.

 AddLinearConstraint(String, IListDecisionVariable, IListDouble, ConstraintType, Double) 
Adds a linear constraint to the optimization model.

 AddVariable(String) 
Adds a variable to the collection.

 AddVariable(String, Double, Double) 
Adds a variable to the collection.

 CreateLinearConstraints(MatrixDouble, VectorDouble, Int32) 
Creates linear constraints based on the specified coefficients.

 CreateLinearConstraints(VectorDouble, MatrixDouble, VectorDouble) 
Creates linear constraints based on the specified coefficients and bounds.

 Equals  Determines whether the specified object is equal to the current object. (Inherited from Object.) 
 Finalize  Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) 
 GetHashCode  Serves as the default hash function. (Inherited from Object.) 
 GetSolution 
Gets the solution to the optimization model.

 GetType  Gets the Type of the current instance. (Inherited from Object.) 
 MemberwiseClone  Creates a shallow copy of the current Object. (Inherited from Object.) 
 OnAddConstraint 
Notifies the optimization model that a constraint has been added.

 OnAddVariable 
Notifies the optimization model that a variable has been added.

 OnRemoveAllConstraints 
Notifies the optimization model that all constraints has been removed.

 OnRemoveAllVariables 
Notifies the optimization model that all variables has been removed.

 OnRemoveConstraint 
Notifies the optimization model that a constraint has been removed.

 OnRemoveVariable 
Notifies the optimization model that a variable has been removed.

 Solve 
Solves the model and returns the solution.

 SolveModel 
Solves the model and returns a report detailing the solution.

 ToString  Returns a string that represents the current object. (Inherited from Object.) 
Top
The OptimizationModel class serves as the abstract base class for classes that represent optimization models.
A model has variables and constraints.
They are made available through the Variables and Constraints properties. These collections are indexed
by name and by position. The types of constraints that are allowed depend on the concrete class.
OptimizationModel instances cannot be created directly. Instead, create an instance of one of the derivived classes:
Class  Purpose 

LinearProgram  Optimize a linear objective function subject to linear constraints. 
QuadraticProgram  Optimize a quadratic objective function subject to linear constraints. 
NonlinearProgram  Optimize a possibly nonlinear objective function subject to both linear and nonlinear constraints. 
The Solve method solves the optimization model using a dual Revised Simplex Method.
Note that this operation can take a long time for large problems or difficult problems. Most problems up to several hundred
variables are solved within a fraction of a second. The Status
property returns a OptimizationModelStatus value that indicates the result of the calculation.
A value of Optimal indicates an optimal solution was found.
The Solve method returns a Vector containing
the optimal values for the variables. The values of the variables are also avaialble through the Value
property of the variables. The OptimalValue property returns the optimal value.
Reference