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 | |
---|
1 | using HeuristicLab.Core;
|
---|
2 | using HeuristicLab.Data;
|
---|
3 | using HeuristicLab.Parameters;
|
---|
4 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
5 |
|
---|
6 | namespace 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.