Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/GlpkSolver.cs @ 16172

Last change on this file since 16172 was 16172, checked in by ddorfmei, 6 years ago

#2931:

  • created LinearProgrammingAlgorithm
    • created definitions for all LP/MIP solvers supported by OR-Tools
  • created LinearProgrammingProblem
    • created classes required for scripting: LinearProgrammingProblemDefinition, LinearProgrammingProblemDefinitionScript, CompiledLinearProgrammingProblemDefinition
    • created views: LinearProgrammingProblemView, LinearProgrammingProblemDefinitionScriptView
  • updated OR-Tools version in ExtLibs to 6.9
File size: 837 bytes
Line 
1using HeuristicLab.Core;
2using HeuristicLab.Data;
3using HeuristicLab.Parameters;
4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
5
6namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms {
7  [Item("GLPK", "GLPK (https://www.gnu.org/software/glpk/) can be used out of the box.")]
8  [StorableClass]
9  public class GlpkSolver : Solver {
10
11    public GlpkSolver() {
12      Parameters.Add(libraryNameParam = new FixedValueParameter<StringValue>(nameof(LibraryName), new StringValue("glpk_4_65.dll")));
13    }
14
15    public override OptimizationProblemType OptimizationProblemType =>
16      LinearProgrammingType == LinearProgrammingType.LinearProgramming
17        ? OptimizationProblemType.GLPK_LINEAR_PROGRAMMING
18        : OptimizationProblemType.GLPK_MIXED_INTEGER_PROGRAMMING;
19  }
20}
Note: See TracBrowser for help on using the repository browser.