Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/18/18 13:55:09 (6 years ago)
Author:
ddorfmei
Message:

#2931:

  • updated plugin dependencies
  • added solver library name defaults to settings
Location:
branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/ISolver.cs

    r16233 r16234  
    66  public interface ISolver : IParameterizedNamedItem {
    77    LinearProgrammingType LinearProgrammingType { get; set; }
    8     OptimizationProblemType OptimizationProblemType { get; }
    98    bool SupportsPause { get; }
    109    bool SupportsStop { get; }
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/IncrementalSolver.cs

    r16233 r16234  
    6666    public override void Solve(LinearProgrammingAlgorithm algorithm, CancellationToken cancellationToken) {
    6767      if (!Incrementality) {
    68         base.Solve(algorithm);
     68        base.Solve(algorithm, cancellationToken);
    6969        return;
    7070      }
     
    7979        }
    8080      }
    81    
     81
    8282      var iterations = (long)timeLimit.TotalMilliseconds / (long)QualityUpdateInterval.TotalMilliseconds;
    8383      var remaining = timeLimit - TimeSpan.FromMilliseconds(iterations * QualityUpdateInterval.TotalMilliseconds);
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/Solver.cs

    r16233 r16234  
    3838    }
    3939
    40     public virtual OptimizationProblemType OptimizationProblemType { get; }
     40    protected virtual OptimizationProblemType OptimizationProblemType { get; }
    4141    public virtual bool SupportsPause => false;
    4242    public virtual bool SupportsStop => false;
     
    5353
    5454    public virtual void Solve(LinearProgrammingAlgorithm algorithm, CancellationToken cancellationToken) =>
    55       Solve(algorithm, CancellationToken.None);
     55      Solve(algorithm);
    5656
    5757    public virtual void Solve(LinearProgrammingAlgorithm algorithm) =>
     
    5959
    6060    public virtual void Solve(LinearProgrammingAlgorithm algorithm, TimeSpan timeLimit, bool incrementality) {
    61       var libraryName = string.Empty;
    62       if (this is ExternalSolver externalSolver)
     61      string libraryName = null;
     62      if (this is IExternalSolver externalSolver)
    6363        libraryName = externalSolver.LibraryName;
    6464
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/BopSolver.cs

    r16233 r16234  
    1313    }
    1414
    15     public override OptimizationProblemType OptimizationProblemType => OptimizationProblemType.BOP_INTEGER_PROGRAMMING;
    1615    public override bool SupportsPause => true;
     16
    1717    public override bool SupportsStop => true;
     18
     19    protected override OptimizationProblemType OptimizationProblemType =>
     20              OptimizationProblemType.BOP_INTEGER_PROGRAMMING;
    1821  }
    1922}
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/CoinOrSolver.cs

    r16233 r16234  
    2727    }
    2828
    29     public override OptimizationProblemType OptimizationProblemType =>
     29    protected override OptimizationProblemType OptimizationProblemType =>
    3030      LinearProgrammingType == LinearProgrammingType.LinearProgramming
    3131        ? OptimizationProblemType.CLP_LINEAR_PROGRAMMING
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/CplexSolver.cs

    r16233 r16234  
    1313    public CplexSolver() {
    1414      Parameters.Add(libraryNameParam = new FixedValueParameter<FileValue>(nameof(LibraryName),
    15         new FileValue { FileDialogFilter = FileDialogFilter, Value = "cplex1280.dll" }));
     15        new FileValue { FileDialogFilter = FileDialogFilter, Value = Properties.Settings.Default.CplexLibraryName }));
    1616    }
    1717
    18     public override OptimizationProblemType OptimizationProblemType =>
     18    protected override OptimizationProblemType OptimizationProblemType =>
    1919      LinearProgrammingType == LinearProgrammingType.LinearProgramming
    2020        ? OptimizationProblemType.CPLEX_LINEAR_PROGRAMMING
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/GlopSolver.cs

    r16233 r16234  
    1414    }
    1515
    16     public override OptimizationProblemType OptimizationProblemType => OptimizationProblemType.GLOP_LINEAR_PROGRAMMING;
    1716    public override bool SupportsPause => true;
     17
    1818    public override bool SupportsStop => true;
     19
     20    protected override OptimizationProblemType OptimizationProblemType =>
     21              OptimizationProblemType.GLOP_LINEAR_PROGRAMMING;
    1922  }
    2023}
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/GlpkSolver.cs

    r16233 r16234  
    1313    public GlpkSolver() {
    1414      Parameters.Add(libraryNameParam = new FixedValueParameter<FileValue>(nameof(LibraryName),
    15         new FileValue { FileDialogFilter = FileDialogFilter, Value = "glpk465.dll" }));
     15        new FileValue { FileDialogFilter = FileDialogFilter, Value = Properties.Settings.Default.GlpkLibraryName }));
    1616
    1717      programmingTypeParam.Value.ValueChanged += (sender, args) => {
     
    3131    }
    3232
    33     public override OptimizationProblemType OptimizationProblemType =>
     33    protected override OptimizationProblemType OptimizationProblemType =>
    3434      LinearProgrammingType == LinearProgrammingType.LinearProgramming
    3535        ? OptimizationProblemType.GLPK_LINEAR_PROGRAMMING
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/GurobiSolver.cs

    r16233 r16234  
    1414    public GurobiSolver() {
    1515      Parameters.Add(libraryNameParam = new FixedValueParameter<FileValue>(nameof(LibraryName),
    16         new FileValue { FileDialogFilter = FileDialogFilter, Value = "gurobi80.dll" }));
     16        new FileValue { FileDialogFilter = FileDialogFilter, Value = Properties.Settings.Default.GurobiLibraryName }));
    1717    }
    1818
     
    2222    }
    2323
    24     public override OptimizationProblemType OptimizationProblemType =>
    25       LinearProgrammingType == LinearProgrammingType.LinearProgramming
     24    public override bool SupportsPause => true;
     25
     26    public override bool SupportsStop => true;
     27
     28    protected override OptimizationProblemType OptimizationProblemType =>
     29              LinearProgrammingType == LinearProgrammingType.LinearProgramming
    2630        ? OptimizationProblemType.GUROBI_LINEAR_PROGRAMMING
    2731        : OptimizationProblemType.GUROBI_MIXED_INTEGER_PROGRAMMING;
    28 
    29     public override bool SupportsPause => true;
    30     public override bool SupportsStop => true;
    3132  }
    3233}
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/ScipSolver.cs

    r16233 r16234  
    1313    public ScipSolver() {
    1414      Parameters.Add(libraryNameParam = new FixedValueParameter<FileValue>(nameof(LibraryName),
    15         new FileValue { FileDialogFilter = FileDialogFilter, Value = "scip.dll" }));
     15        new FileValue { FileDialogFilter = FileDialogFilter, Value = Properties.Settings.Default.ScipLibraryName }));
    1616      programmingTypeParam.Value =
    1717        (EnumValue<LinearProgrammingType>)new EnumValue<LinearProgrammingType>(LinearProgrammingType
     
    1919    }
    2020
    21     public override OptimizationProblemType OptimizationProblemType =>
    22       OptimizationProblemType.SCIP_MIXED_INTEGER_PROGRAMMING;
     21    public override bool SupportsPause => true;
    2322
    24     public override bool SupportsPause => true;
    2523    public override bool SupportsStop => true;
     24
     25    protected override OptimizationProblemType OptimizationProblemType =>
     26              OptimizationProblemType.SCIP_MIXED_INTEGER_PROGRAMMING;
    2627  }
    2728}
Note: See TracChangeset for help on using the changeset viewer.