Class FicoXpressSolver
This class allows you to use Xpress from the Optimization.Framework
Inheritance
Inherited Members
Namespace: OPTANO.Modeling.Optimization.Solver.FicoXpress79
Assembly: Optimization.Solver.FicoXpress79.dll
Syntax
public class FicoXpressSolver : GenericSolverBase<FicoXpressSolverConfiguration>, ISolver, ICanSolve<Model, Solution>, IAbortable, IDisposable
Constructors
FicoXpressSolver(FicoXpressSolverConfiguration)
Initializes a new instance of the FicoXpressSolver class.
Declaration
public FicoXpressSolver(FicoXpressSolverConfiguration configuration = null)
Parameters
Type | Name | Description |
---|---|---|
FicoXpressSolverConfiguration | configuration | The configuration. |
Properties
LogFileStream
Gets or sets the log file stream.
Declaration
protected StreamWriter LogFileStream { get; set; }
Property Value
Type | Description |
---|---|
System.IO.StreamWriter |
Methods
Abort()
Aborts the solution process.
Declaration
public override void Abort()
Overrides
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | FicoXpressSolver currently cannot be aborted. |
AddConstraint(Constraint)
Adds the given Constraint to the BCL.XPRBprob.
Declaration
protected void AddConstraint(Constraint constraint)
Parameters
Type | Name | Description |
---|---|---|
Constraint | constraint | The constraint to add. |
AddObjective(Objective)
Adds the given Objective to the BCL.XPRBprob.
Declaration
protected override void AddObjective(Objective objective)
Parameters
Type | Name | Description |
---|---|---|
Objective | objective | The objective to add. |
Overrides
BuildSolverModelAdapterSpecific(Int32)
Initialize the Xpress Environment and build the Xpress Model.
Declaration
protected override void BuildSolverModelAdapterSpecific(int prioLevel = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | prioLevel | The prio level. |
Overrides
CanExportFile(FileInfo, ExportTime, Boolean)
Determines a value indicating whether this solver can export the current _model.
Declaration
protected override bool CanExportFile(FileInfo outputFile, ExportTime exportTime, bool printHints = false)
Parameters
Type | Name | Description |
---|---|---|
System.IO.FileInfo | outputFile | The file to export. |
ExportTime | exportTime | Export before or after solve. |
System.Boolean | printHints |
|
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
ClearLastModel()
Clears the last model.
Declaration
public override void ClearLastModel()
Overrides
DisposeCustom()
Declaration
protected override void DisposeCustom()
Overrides
ExportFileSolverSpecific(FileInfo)
The export model solver specific.
Declaration
protected override void ExportFileSolverSpecific(FileInfo outputFile)
Parameters
Type | Name | Description |
---|---|---|
System.IO.FileInfo | outputFile |
Overrides
LogToConsole(Object, XpressMessageArgs)
The message callback.
Declaration
protected virtual void LogToConsole(object sender, XpressMessageArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | |
XpressMessageArgs | e | The event argument |
RemoveConstraint(String)
Removes the given Constraint from the BCL.XPRBprob.
Declaration
protected override void RemoveConstraint(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The Name of the constraint to remove. |
Overrides
SetBranchingDirectionAdapterSpecific()
Set the BranchingDirection for all discrete variables.
Declaration
protected override void SetBranchingDirectionAdapterSpecific()
Overrides
SetBranchingPriorityAdapterSpecific()
Set the BranchingPriority for all discrete variables.
Declaration
protected override void SetBranchingPriorityAdapterSpecific()
Overrides
SetConfigurationAdapterSpecific()
Sets the xpress configuration.
Declaration
protected override void SetConfigurationAdapterSpecific()
Overrides
SolveAdapterSpecific(Int32, IDictionary<Variable, Double>)
Solves the specified CurrentModel.
If specified in CopySolutionToModel, the results of a solved Model will automatically
be written in the OPTANO.Modeling's Variables.
Declaration
protected override Solution SolveAdapterSpecific(int prioLevel = 0, IDictionary<Variable, double> variableValues = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | prioLevel | The priority level to solve for. |
System.Collections.Generic.IDictionary<Variable, System.Double> | variableValues | The starting values to pass as |
Returns
Type | Description |
---|---|
Solution | The Solution. Before accessing the VariableValues, make sure that the Model is Feasible and the Solution is Feasible or Optimal. |
Overrides
TryLogToFile(Object, XpressMessageArgs)
Declaration
protected virtual void TryLogToFile(object sender, XpressMessageArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | |
XpressMessageArgs | e |
Events
MessageCallback
The message callback.
Declaration
public event EventHandler<XpressMessageArgs> MessageCallback
Event Type
Type | Description |
---|---|
System.EventHandler<XpressMessageArgs> |