Last change
on this file since 16233 was
16233,
checked in by ddorfmei, 6 years ago
|
#2931:
- added all available parameters OR-Tools's linear_solver to LinearProgrammingAlgorithm
- added necessary parameter enums
- moved solving logic to Solver
- created IncrementalSolver, ExternalSolver, ExternalIncrementalSolver
- added logic for solvers that can be stopped and resumed
- added SupportsStop property to BasicAlgorithm
- added quality per time chart for incremental solvers
|
File size:
1.3 KB
|
Line | |
---|
1 | using HeuristicLab.Common;
|
---|
2 | using HeuristicLab.Core;
|
---|
3 | using HeuristicLab.Data;
|
---|
4 | using HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base;
|
---|
5 | using HeuristicLab.Parameters;
|
---|
6 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers {
|
---|
9 |
|
---|
10 | [Item("Gurobi", "Gurobi (http://www.gurobi.com/) must be installed and licenced.")]
|
---|
11 | [StorableClass]
|
---|
12 | public class GurobiSolver : ExternalIncrementalSolver {
|
---|
13 |
|
---|
14 | public GurobiSolver() {
|
---|
15 | Parameters.Add(libraryNameParam = new FixedValueParameter<FileValue>(nameof(LibraryName),
|
---|
16 | new FileValue { FileDialogFilter = FileDialogFilter, Value = "gurobi80.dll" }));
|
---|
17 | }
|
---|
18 |
|
---|
19 | protected GurobiSolver(GurobiSolver original, Cloner cloner)
|
---|
20 | : base(original, cloner) {
|
---|
21 | programmingTypeParam = cloner.Clone(original.programmingTypeParam);
|
---|
22 | }
|
---|
23 |
|
---|
24 | public override OptimizationProblemType OptimizationProblemType =>
|
---|
25 | LinearProgrammingType == LinearProgrammingType.LinearProgramming
|
---|
26 | ? OptimizationProblemType.GUROBI_LINEAR_PROGRAMMING
|
---|
27 | : OptimizationProblemType.GUROBI_MIXED_INTEGER_PROGRAMMING;
|
---|
28 |
|
---|
29 | public override bool SupportsPause => true;
|
---|
30 | public override bool SupportsStop => true;
|
---|
31 | }
|
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.