Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/19/18 14:15:49 (5 years ago)
Author:
ddorfmei
Message:

#2931:

  • moved views to separate plugin HeuristicLab.MathematicalOptimization.Views
  • added button in LinearProgrammingProblemView to select the problem definition type
  • added views for problem definitions
  • added ExportFile parameter to LinearProgrammingAlgorithm
  • extended FileValue and FileValueView by the option to save a file
  • code cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Templates/CompiledLinearProgrammingProblemDefinition.cs

    r16373 r16405  
    66using HeuristicLab.Core;
    77using HeuristicLab.Data;
    8 using HeuristicLab.MathematicalOptimization.LinearProgramming.Problems;
    98using HeuristicLab.Optimization;
    10 using HeuristicLab.Problems.Programmable;
    119using Variable = Google.OrTools.LinearSolver.Variable;
    1210
     
    2220    }
    2321
    24     public bool BuildModel(Solver solver) {
     22    public void BuildModel(Solver solver) {
    2523      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
     24      // How to define a model using Google OR-Tools: https://developers.google.com/optimization/introduction/cs
    2625      // Example model taken from https://developers.google.com/optimization/mip/integer_opt
    2726      // Define the decision variables
     
    3231      // Define the objective
    3332      solver.Maximize(x + 10 * y);
    34       return true;
    3533    }
    3634
    3735    public void Analyze(Solver solver, ResultCollection results) {
    3836      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
    39       // Write or update results given the solution variables of the decision variables
     37      // Write or update results given the solution values of the decision variables
    4038      results.AddOrUpdateResult("x", new DoubleValue(x.SolutionValue()));
    4139      results.AddOrUpdateResult("y", new DoubleValue(y.SolutionValue()));
Note: See TracChangeset for help on using the changeset viewer.