Class GenericSolverBase<T>
Represents a SolverBase instance for mathematical programming problems.
Inherited Members
Namespace: OPTANO.Modeling.Optimization
Assembly: Optimization.dll
Syntax
public abstract class GenericSolverBase<T> : SolverBase, ISolver, ICanSolve<Model, Solution>, IAbortable, IDisposable where T : SolverConfiguration
Type Parameters
Name | Description |
---|---|
T | The type of the specific SolverConfiguration. |
Constructors
GenericSolverBase(T, NativeMultiObjectiveSupport, MinOperatorReplacement, MaxOperatorReplacement, FloorOperatorReplacement, CeilOperatorReplacement, AbsOperatorReplacement, NotConstraintReplacement, OrConstraintReplacement, ImplicationConstraintReplacement, SOSHandling, SOSHandling, SOSHandling, TriviallyFeasibleConstraintHandling)
Initializes a new instance of the GenericSolverBase<T> class.
If any operator replacement has the value DoNotReplace
, the SolverAdapter needs to handle that OperatorExpression type manually.
Declaration
protected GenericSolverBase(T config, NativeMultiObjectiveSupport nativeMultiObjectiveSupport = NativeMultiObjectiveSupport.Unsupported, MinOperatorReplacement minOperatorReplacement = MinOperatorReplacement.ReplaceWithDefaultMethod, MaxOperatorReplacement maxOperatorReplacement = MaxOperatorReplacement.ReplaceWithDefaultMethod, FloorOperatorReplacement floorOperatorReplacement = FloorOperatorReplacement.ReplaceWithDefaultMethod, CeilOperatorReplacement ceilOperatorReplacement = CeilOperatorReplacement.ReplaceWithDefaultMethod, AbsOperatorReplacement absOperatorReplacement = AbsOperatorReplacement.ReplaceWithDefaultMethod, NotConstraintReplacement notConstraintReplacement = NotConstraintReplacement.ReplaceWithDefaultMethod, OrConstraintReplacement orConstraintReplacement = OrConstraintReplacement.ReplaceWithDefaultMethod, ImplicationConstraintReplacement implicationConstraintReplacement = ImplicationConstraintReplacement.ReplaceWithDefaultMethod, SOSHandling sos1Handling = SOSHandling.Emulated, SOSHandling sos2Handling = SOSHandling.Emulated, SOSHandling sos3Handling = SOSHandling.Emulated, TriviallyFeasibleConstraintHandling trivialConstraintHandling = TriviallyFeasibleConstraintHandling.Native)
Parameters
Type | Name | Description |
---|---|---|
T | config | The solver configuration. |
NativeMultiObjectiveSupport | nativeMultiObjectiveSupport | The native support for multiobjective optimization. |
MinOperatorReplacement | minOperatorReplacement | The desired MinOperatorReplacement method. |
MaxOperatorReplacement | maxOperatorReplacement | The desired MaxOperatorReplacement method. |
FloorOperatorReplacement | floorOperatorReplacement | The desired FloorOperatorReplacement method. |
CeilOperatorReplacement | ceilOperatorReplacement | The desired CeilOperatorReplacement method. |
AbsOperatorReplacement | absOperatorReplacement | The desired AbsOperatorReplacement method. |
NotConstraintReplacement | notConstraintReplacement | The desired NotConstraintReplacement method. |
OrConstraintReplacement | orConstraintReplacement | The desired OrConstraintReplacement method. |
ImplicationConstraintReplacement | implicationConstraintReplacement | The desired ImplicationConstraintReplacement method. |
SOSHandling | sos1Handling | The indicator whether SOS of type S1 should be handled by the solver adapter iteself (Native), or by the ModelTransformation (Emulated). |
SOSHandling | sos2Handling | The indicator whether SOS of type S2 should be handled by the solver adapter iteself (Native), or by the ModelTransformation (Emulated). |
SOSHandling | sos3Handling | The indicator whether SOS of type S3 should be handled by the solver adapter iteself (Native), or by the ModelTransformation (Emulated). |
TriviallyFeasibleConstraintHandling | trivialConstraintHandling | If the solver cannot handle trivially feasible constraints, the user needs to make sure to remove them from the model before calling |
Properties
Configuration
Gets or sets the configuration of this GenericSolverBase<T> instance.
Hides member Configuration. If a config that is not T
was set via Configuration, an System.InvalidCastException is thrown.
Declaration
public T Configuration { get; set; }
Property Value
Type | Description |
---|---|
T |