Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/19/18 14:15:49 (6 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
Location:
branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Templates
Files:
3 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()));
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Templates/ScriptTemplates.Designer.cs

    r16233 r16405  
    6060
    6161    /// <summary>
    62     ///   Looks up a localized string similar to using Google.OrTools.LinearSolver;
     62    ///   Looks up a localized string similar to using System;
     63    ///using System.Linq;
     64    ///using System.Collections.Generic;
     65    ///using Google.OrTools.LinearSolver;
     66    ///using HeuristicLab.Common;
     67    ///using HeuristicLab.Core;
    6368    ///using HeuristicLab.Data;
    6469    ///using HeuristicLab.MathematicalOptimization.LinearProgramming.Problems;
    6570    ///using HeuristicLab.Optimization;
    66     ///using HeuristicLab.Problems.Programmable;
     71    ///using Variable = Google.OrTools.LinearSolver.Variable;
    6772    ///
    6873    ///namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
    69     ///  public class CompiledLinearProgrammingProblemDefinition : CompiledProblemDefinition, ILinearProgrammingProblemDefinition {
    7074    ///
    71     ///    private Variable x;
    72     ///    private Variable y;
    73     ///
    74     ///    public override void Initialize() {
    75     ///      // [rest of string was truncated]&quot;;.
     75    ///  public class CompiledLinearProgrammingProblemDefinition : CompiledProblemDefinition, ILi [rest of string was truncated]&quot;;.
    7676    /// </summary>
    7777    internal static string CompiledLinearProgrammingProblemDefinition {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Templates/ScriptTemplates.resx

    r16233 r16405  
    6060            : and then encoded with base64 encoding.
    6161    -->
    62   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/QualityUpdateIntervalMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    63     <xsd:import namespace="http://www.w3.org/QualityUpdateIntervalML/1998/namespace" />
     62  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
     63    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    6464    <xsd:element name="root" msdata:IsDataSet="true">
    6565      <xsd:complexType>
     
    120120  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    121121  <data name="CompiledLinearProgrammingProblemDefinition" type="System.Resources.ResXFileRef, System.Windows.Forms">
    122     <value>CompiledLinearProgrammingProblemDefinition.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
     122    <value>compiledlinearprogrammingproblemdefinition.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
    123123  </data>
    124124</root>
Note: See TracChangeset for help on using the changeset viewer.