Show / Hide Table of Contents

    Class HighsSolver17x

    Solver adapter for the HiGHS solver. See also: https://ergo-code.github.io/HiGHS/index.html

    Inheritance
    System.Object
    SolverBase
    GenericSolverBase<HighsSolverConfiguration17x>
    HighsSolver17x
    Inherited Members
    GenericSolverBase<HighsSolverConfiguration17x>.Configuration
    SolverBase._busyLock
    SolverBase.CurrentModel
    SolverBase.TriviallyFeasibleConstraintHandling
    SolverBase.Transformation
    SolverBase._model
    SolverBase.IsMultiHierachicalModel
    SolverBase.SetMultiHierarchicalInterruptionCallback(SolverBase.InterruptMultiHierarchicalOptimization)
    SolverBase.Solve(Model, Dictionary<Variable, Double>)
    SolverBase.CachedMergedObjectives
    SolverBase.GetMergedObjectiveForPriorityLevel(Int32, Boolean)
    SolverBase.GetRelevantObjectivesForPrioLevel(Int32)
    SolverBase.ResolveAdapterSpecific(Int32, IDictionary<Variable, Double>)
    SolverBase.RestoreModel(Solution)
    SolverBase.TransformModel()
    SolverBase.ExportFileSolverSpecific(FileInfo)
    SolverBase.CanExportFile(FileInfo, ExportTime, Boolean)
    SolverBase.RebuildSolverModelAdapterSpecific(Int32)
    SolverBase.SetBranchingPriorityAdapterSpecific()
    SolverBase.SetBranchingDirectionAdapterSpecific()
    SolverBase.SetTimelimitAndGapForCurrentStage(Int32, TimeSpan, Double)
    SolverBase.Dispose()
    SolverBase.DisposeCustom()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: OPTANO.Modeling.Optimization.Solver.Highs17x
    Assembly: Optimization.Solver.Highs17x.dll
    Syntax
    public class HighsSolver17x : GenericSolverBase<HighsSolverConfiguration17x>, ISolver, ICanSolve<Model, Solution>, IAbortable, IDisposable

    Constructors

    HighsSolver17x(HighsSolverConfiguration17x, TriviallyFeasibleConstraintHandling)

    Declaration
    public HighsSolver17x(HighsSolverConfiguration17x config = null, TriviallyFeasibleConstraintHandling trivialConstraintHandling = TriviallyFeasibleConstraintHandling.Native)
    Parameters
    Type Name Description
    HighsSolverConfiguration17x config
    TriviallyFeasibleConstraintHandling trivialConstraintHandling

    Properties

    HighsModel

    Declaration
    protected Highs.HighsModel HighsModel { get; set; }
    Property Value
    Type Description
    Highs.HighsModel

    HighsSolver

    Declaration
    protected Highs.HighsLpSolver HighsSolver { get; set; }
    Property Value
    Type Description
    Highs.HighsLpSolver

    Methods

    Abort()

    Aborts the current optimization.

    Declaration
    public override void Abort()
    Overrides
    SolverBase.Abort()

    AddObjective(Objective)

    Internal method to add an Objective to the current solver model. Should be called from the OPTANO.Modeling.Optimization.Solver.Interfaces.ICanManipulateANativeSolver.AddObjective(OPTANO.Modeling.Optimization.Objective) method. This method does not check whether the solver .

    Declaration
    protected override void AddObjective(Objective objective)
    Parameters
    Type Name Description
    Objective objective

    The objective to add

    Overrides
    SolverBase.AddObjective(Objective)

    BuildSolverModelAdapterSpecific(Int32)

    This method needs to build the solver API's specific model from the current OPTANO Model. It is important to perform the whole work in this call, since benchmark statistics, such as required RAM, and time to build the model, are gathered during the execution of this method.

    Declaration
    protected override void BuildSolverModelAdapterSpecific(int prioLevel = 0)
    Parameters
    Type Name Description
    System.Int32 prioLevel

    The prio Level.

    Overrides
    SolverBase.BuildSolverModelAdapterSpecific(Int32)

    ClearIndexLists()

    Declaration
    protected void ClearIndexLists()

    ClearLastModel()

    Clears the last model.

    Declaration
    public override void ClearLastModel()
    Overrides
    SolverBase.ClearLastModel()

    RemoveConstraint(String)

    Internal method to remove a constraint from the current solver model. Should be called from the OPTANO.Modeling.Optimization.Solver.Interfaces.ICanManipulateANativeSolver.RemoveConstraint(System.String) method. This method does not check whether the solver .

    Declaration
    protected override void RemoveConstraint(string name)
    Parameters
    Type Name Description
    System.String name

    The Name of the constraint to remove.

    Overrides
    SolverBase.RemoveConstraint(String)

    SetConfigurationAdapterSpecific()

    This method is called before every (re-)solve and should set all parameters from the adapter's Configuration in the respective solver.

    Declaration
    protected override void SetConfigurationAdapterSpecific()
    Overrides
    SolverBase.SetConfigurationAdapterSpecific()

    SolveAdapterSpecific(Int32, IDictionary<Variable, Double>)

    This method should solve the CurrentModel, which is set in Solve(Model, Dictionary<Variable, Double>), before SolveAdapterSpecific(Int32, IDictionary<Variable, Double>) is called.

    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 variable values.

    Returns
    Type Description
    Solution

    The Solution.

    Overrides
    SolverBase.SolveAdapterSpecific(Int32, IDictionary<Variable, Double>)

    ThrowOnHighsError(Func<Highs.HighsStatus>)

    Declaration
    protected void ThrowOnHighsError(Func<Highs.HighsStatus> highsAction)
    Parameters
    Type Name Description
    System.Func<Highs.HighsStatus> highsAction

    Extension Methods

    ReflectionHelper.GetFieldValue(Object, String)
    ReflectionHelper.SetFieldValue(Object, String, Object)
    ExtensionMethods.Clone<T>(T)
    ExtensionMethods.ThrowIfArgumentIsNull<T>(T, String)
    Back to top Copyright © OPTANO GmbH generated with DocFX
    Privacy Policy | Impressum – Legal Notice