Show / Hide Table of Contents

    Class ScipOptSolver

    Inheritance
    System.Object
    SolverBase
    GenericSolverBase<ScipOptSolverConfiguration>
    ScipOptSolver
    Inherited Members
    GenericSolverBase<ScipOptSolverConfiguration>.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.CanExportFile(FileInfo, ExportTime, Boolean)
    SolverBase.RebuildSolverModelAdapterSpecific(Int32)
    SolverBase.SetBranchingPriorityAdapterSpecific()
    SolverBase.SetBranchingDirectionAdapterSpecific()
    SolverBase.SetTimelimitAndGapForCurrentStage(Int32, TimeSpan, Double)
    SolverBase.Dispose()
    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: Optimization.Solver.ScipOpt70
    Assembly: Optimization.Solver.ScipOpt70.dll
    Syntax
    public class ScipOptSolver : GenericSolverBase<ScipOptSolverConfiguration>, ISolver, ICanSolve<Model, Solution>, IAbortable, IDisposable

    Constructors

    ScipOptSolver(ScipOptSolverConfiguration, NativeMultiObjectiveSupport, MinOperatorReplacement, MaxOperatorReplacement, FloorOperatorReplacement, CeilOperatorReplacement, AbsOperatorReplacement, NotConstraintReplacement, OrConstraintReplacement, ImplicationConstraintReplacement, SOSHandling, SOSHandling, SOSHandling, TriviallyFeasibleConstraintHandling)

    Declaration
    public ScipOptSolver(ScipOptSolverConfiguration config = null, 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.Native, SOSHandling sos2Handling = SOSHandling.Native, SOSHandling sos3Handling = SOSHandling.Emulated, TriviallyFeasibleConstraintHandling trivialConstraintHandling = TriviallyFeasibleConstraintHandling.Native)
    Parameters
    Type Name Description
    ScipOptSolverConfiguration config
    NativeMultiObjectiveSupport nativeMultiObjectiveSupport
    MinOperatorReplacement minOperatorReplacement
    MaxOperatorReplacement maxOperatorReplacement
    FloorOperatorReplacement floorOperatorReplacement
    CeilOperatorReplacement ceilOperatorReplacement
    AbsOperatorReplacement absOperatorReplacement
    NotConstraintReplacement notConstraintReplacement
    OrConstraintReplacement orConstraintReplacement
    ImplicationConstraintReplacement implicationConstraintReplacement
    SOSHandling sos1Handling
    SOSHandling sos2Handling
    SOSHandling sos3Handling
    TriviallyFeasibleConstraintHandling trivialConstraintHandling

    Fields

    _constraintsInScip

    Declaration
    protected Dictionary<string, SCIP_Cons> _constraintsInScip
    Field Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, OPTANO.Modeling.Optimization.Solver.Scip70.WrapperCsharp.SCIP_Cons>

    _scip

    Declaration
    protected Scip _scip
    Field Value
    Type Description
    OPTANO.Modeling.Optimization.Solver.Scip70.WrapperCsharp.Scip

    _sosCounter

    Declaration
    protected int _sosCounter
    Field Value
    Type Description
    System.Int32

    _variablesInScip

    Declaration
    protected Dictionary<string, SCIP_Var> _variablesInScip
    Field Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, OPTANO.Modeling.Optimization.Solver.Scip70.WrapperCsharp.SCIP_Var>

    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)

    CallAndAbortOnError(Func<SCIP_Retcode>)

    Declaration
    protected void CallAndAbortOnError(Func<SCIP_Retcode> scipCall)
    Parameters
    Type Name Description
    System.Func<OPTANO.Modeling.Optimization.Solver.Scip70.WrapperCsharp.SCIP_Retcode> scipCall

    CheckResultAndThrowOnError(SCIP_Retcode)

    Declaration
    protected void CheckResultAndThrowOnError(SCIP_Retcode result)
    Parameters
    Type Name Description
    OPTANO.Modeling.Optimization.Solver.Scip70.WrapperCsharp.SCIP_Retcode result

    ClearLastModel()

    Clears the last model.

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

    DisposeCustom()

    Disposes this solver instance. For solvers such as the GurobiSolver, the license that was used for the solver instance is freed when this method is called.

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

    ExportFileSolverSpecific(FileInfo)

    This method will be called right after (the first call of) BuildSolverModelAdapterSpecific(Int32) and should utilize the Solver-built in capabilities to export models in different file formats. By default this method only exports models as LP, using the LPExporter.

    @Devs: Don't forget to check if IsMultiHierachicalModel and to return false for CanExportFile(FileInfo, ExportTime, Boolean), if your solver cannot export such a model correctly!

    ExportFileSolverSpecific(FileInfo) and CanExportFile(FileInfo, ExportTime, Boolean) will only be called, if ModelOutputFile is not null.

    Declaration
    protected override void ExportFileSolverSpecific(FileInfo filteredFileToWrite)
    Parameters
    Type Name Description
    System.IO.FileInfo filteredFileToWrite
    Overrides
    SolverBase.ExportFileSolverSpecific(FileInfo)

    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> startSolutionValues = null)
    Parameters
    Type Name Description
    System.Int32 prioLevel

    The priority level to solve for.

    System.Collections.Generic.IDictionary<Variable, System.Double> startSolutionValues
    Returns
    Type Description
    Solution

    The Solution.

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

    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