Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16288 for branches


Ignore:
Timestamp:
11/08/18 17:10:53 (5 years ago)
Author:
ddorfmei
Message:

#2931:

  • added license information to all files
  • added missing storable and cloning constructors
  • fixed a bug that caused an exception when a Hive Slave tried to delete the files in the PluginTemp folder
Location:
branches/2931_OR-Tools_LP_MIP
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.ExtLibs/HeuristicLab.OrTools/6.9.0-pre/HeuristicLab.OrTools-6.9.0-pre/Plugin.cs.frame

    r16233 r16288  
    2121
    2222using System;
     23using System.IO;
     24using System.Linq;
     25using System.Runtime.InteropServices;
    2326using HeuristicLab.PluginInfrastructure;
    2427
    2528namespace HeuristicLab.OrTools {
     29
    2630  [Plugin("HeuristicLab.OrTools", "Provides functionality of Google OR-Tools in HeuristicLab. Requires Windows 64-bit", "6.9.0.$WCREV$")]
    2731  [PluginFile("HeuristicLab.OrTools-6.9.0-pre.dll", PluginFileType.Assembly)]
     
    3034  [PluginFile("Google.OrTools.runtime.win-x64.dll", PluginFileType.NativeDll)]
    3135  [PluginFile("Google.OrTools_version.txt", PluginFileType.Data)]
     36  [PluginFile("Google.Protobuf.dll", PluginFileType.Assembly)]
    3237  [PluginFile("glpk_4_65.dll", PluginFileType.NativeDll)]
    3338  [PluginFile("glpk-license.txt", PluginFileType.License)]
    3439  public class HeuristicLabOrToolsPlugin : PluginBase {
     40
     41    ~HeuristicLabOrToolsPlugin() {
     42      OnUnload(); // HACK: remove once ticket #2961 is solved
     43    }
     44
     45    public override void OnUnload() {
     46      base.OnUnload();
     47
     48      var thisClass = typeof(HeuristicLabOrToolsPlugin);
     49      var dir = new FileInfo(thisClass.Assembly.Location).Directory;
     50      if (dir == null)
     51        return;
     52
     53      var nativeDlls = thisClass.GetCustomAttributes(typeof(PluginFileAttribute), true)
     54        .Cast<PluginFileAttribute>()
     55        .Where(pf => pf.FileType == PluginFileType.NativeDll)
     56        .Select(pf => pf.FileName);
     57
     58      foreach (var nativeDll in dir.EnumerateFiles().Where(f => nativeDlls.Contains(f.Name))) {
     59        var handle = LoadLibrary(nativeDll.FullName);
     60        if (handle == IntPtr.Zero)
     61          continue;
     62
     63        FreeLibrary(handle); // close handle obtained above
     64        FreeLibrary(handle); // close implicitly obtained handle
     65      }
     66    }
     67
     68    [DllImport("kernel32.dll", SetLastError = true)]
     69    [return: MarshalAs(UnmanagedType.Bool)]
     70    private static extern bool FreeLibrary(IntPtr hModule);
     71
     72    [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Ansi)]
     73    private static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)]string lpFileName);
    3574  }
    3675}
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.ExtLibs/HeuristicLab.OrTools/6.9.0-pre/HeuristicLab.OrTools-6.9.0-pre/Properties/AssemblyInfo.cs

    r16233 r16288  
    5454// [assembly: AssemblyVersion("1.0.*")]
    5555[assembly: AssemblyVersion("6.8.0.0")]
    56 [assembly: AssemblyFileVersion("6.8.0.16172")]
     56[assembly: AssemblyFileVersion("6.8.0.16233")]
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/HeuristicLab.MathematicalOptimization-3.3.csproj

    r16234 r16288  
    177177    <Compile Include="Properties\AssemblyInfo.cs" />
    178178    <Compile Include="Properties\Settings.Designer.cs">
    179       <DependentUpon>Settings.settings</DependentUpon>
    180179      <AutoGen>True</AutoGen>
    181180      <DesignTimeSharedInput>True</DesignTimeSharedInput>
     181      <DependentUpon>Settings.settings</DependentUpon>
    182182    </Compile>
    183183    <None Include="app.config" />
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/LinearProgrammingAlgorithm.cs

    r16233 r16288  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Threading;
    324using Google.OrTools.LinearSolver;
     
    3859
    3960    [Storable]
    40     private readonly IConstrainedValueParameter<ISolver> solverParam;
     61    private IConstrainedValueParameter<ISolver> solverParam;
    4162
    4263    [Storable]
    4364    private readonly IFixedValueParameter<TimeSpanValue> timeLimitParam;
     65
     66    public IConstrainedValueParameter<ISolver> SolverParameter {
     67      get { return solverParam; }
     68      set { solverParam = value; }
     69    }
    4470
    4571    public LinearProgrammingAlgorithm() {
     
    77103
    78104    [StorableConstructor]
    79     private LinearProgrammingAlgorithm(bool deserializing)
     105    protected LinearProgrammingAlgorithm(bool deserializing)
    80106      : base(deserializing) {
    81107    }
    82108
    83     private LinearProgrammingAlgorithm(LinearProgrammingAlgorithm original, Cloner cloner)
     109    protected LinearProgrammingAlgorithm(LinearProgrammingAlgorithm original, Cloner cloner)
    84110      : base(original, cloner) {
    85111      solverParam = cloner.Clone(original.solverParam);
     
    166192      Solver.Interrupt();
    167193    }
     194
    168195    protected override void Initialize(CancellationToken cancellationToken) {
    169196      base.Initialize(cancellationToken);
    170197    }
     198
    171199    protected override void Run(CancellationToken cancellationToken) => Solver.Solve(this, cancellationToken);
    172200  }
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/LinearProgrammingType.cs

    r16233 r16288  
    1 namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms {
    223
    324  public enum LinearProgrammingType {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/ExternalIncrementalSolver.cs

    r16233 r16288  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
    223using HeuristicLab.Core;
    324using HeuristicLab.Data;
     
    1637    }
    1738
     39    [StorableConstructor]
     40    protected ExternalIncrementalSolver(bool deserializing)
     41      : base(deserializing) {
     42    }
     43
    1844    protected ExternalIncrementalSolver(ExternalIncrementalSolver original, Cloner cloner)
    1945      : base(original, cloner) {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/ExternalSolver.cs

    r16233 r16288  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
    223using HeuristicLab.Core;
    324using HeuristicLab.Data;
     
    829  [StorableClass]
    930  public class ExternalSolver : Solver, IExternalSolver {
    10 
    1131    protected const string FileDialogFilter = "Dynamic-Link Library (*.dll)|*.dll|All Files (*.*)|*.*";
    1232
     
    1535
    1636    public ExternalSolver() {
     37    }
     38
     39    [StorableConstructor]
     40    protected ExternalSolver(bool deserializing)
     41      : base(deserializing) {
    1742    }
    1843
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/IExternalSolver.cs

    r16233 r16288  
    1 namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base {
    223
    324  public interface IExternalSolver : ISolver {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/IIncrementalSolver.cs

    r16233 r16288  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223
    324namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/ISolver.cs

    r16234 r16288  
    1 using System.Threading;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System.Threading;
    223using HeuristicLab.Core;
    324
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/IncrementalSolver.cs

    r16234 r16288  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Linq;
    324using System.Threading;
     
    1435  [StorableClass]
    1536  public class IncrementalSolver : Solver, IIncrementalSolver {
     37
    1638    [Storable]
    1739    protected readonly IValueParameter<BoolValue> incrementalityParam;
     
    2648    [Storable]
    2749    private IndexedDataTable<double> qualityPerClock;
     50
     51    [StorableConstructor]
     52    protected IncrementalSolver(bool deserializing)
     53      : base(deserializing) {
     54    }
    2855
    2956    public IncrementalSolver() {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/Base/Solver.cs

    r16234 r16288  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Threading;
    324using HeuristicLab.Common;
     
    4970
    5071    public virtual void Reset() {
     72      solver?.Dispose();
    5173      solver = null;
    5274    }
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/BopSolver.cs

    r16234 r16288  
    1 using HeuristicLab.Core;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
    224using HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base;
    325using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    1335    }
    1436
     37    protected BopSolver(BopSolver original, Cloner cloner)
     38      : base(original, cloner) {
     39    }
     40
     41    [StorableConstructor]
     42    protected BopSolver(bool deserializing)
     43      : base(deserializing) {
     44    }
     45
    1546    public override bool SupportsPause => true;
    1647
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/CoinOrSolver.cs

    r16234 r16288  
    1 using HeuristicLab.Core;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
    224using HeuristicLab.Data;
    325using HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base;
     
    2749    }
    2850
     51    protected CoinOrSolver(CoinOrSolver original, Cloner cloner)
     52      : base(original, cloner) {
     53    }
     54
     55    [StorableConstructor]
     56    protected CoinOrSolver(bool deserializing)
     57      : base(deserializing) {
     58    }
     59
    2960    protected override OptimizationProblemType OptimizationProblemType =>
    3061      LinearProgrammingType == LinearProgrammingType.LinearProgramming
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/CplexSolver.cs

    r16234 r16288  
    1 using HeuristicLab.Core;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
    224using HeuristicLab.Data;
    325using HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base;
     
    1638    }
    1739
     40    [StorableConstructor]
     41    protected CplexSolver(bool deserializing)
     42      : base(deserializing) {
     43    }
     44
     45    protected CplexSolver(CplexSolver original, Cloner cloner)
     46      : base(original, cloner) {
     47    }
     48
    1849    protected override OptimizationProblemType OptimizationProblemType =>
    1950      LinearProgrammingType == LinearProgrammingType.LinearProgramming
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/GlopSolver.cs

    r16234 r16288  
    1 using HeuristicLab.Core;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
    224using HeuristicLab.Data;
    325using HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base;
     
    1436    }
    1537
     38    [StorableConstructor]
     39    protected GlopSolver(bool deserializing)
     40      : base(deserializing) {
     41    }
     42
     43    protected GlopSolver(GlopSolver original, Cloner cloner)
     44      : base(original, cloner) {
     45    }
     46
    1647    public override bool SupportsPause => true;
    1748
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/GlpkSolver.cs

    r16234 r16288  
    1 using HeuristicLab.Core;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
    224using HeuristicLab.Data;
    325using HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base;
     
    3153    }
    3254
     55    protected GlpkSolver(GlpkSolver original, Cloner cloner)
     56      : base(original, cloner) {
     57    }
     58
     59    [StorableConstructor]
     60    protected GlpkSolver(bool deserializing)
     61      : base(deserializing) {
     62    }
     63
    3364    protected override OptimizationProblemType OptimizationProblemType =>
    3465      LinearProgrammingType == LinearProgrammingType.LinearProgramming
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/GurobiSolver.cs

    r16234 r16288  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
    223using HeuristicLab.Core;
    324using HeuristicLab.Data;
     
    2243    }
    2344
     45    [StorableConstructor]
     46    protected GurobiSolver(bool deserializing)
     47      : base(deserializing) {
     48    }
     49
    2450    public override bool SupportsPause => true;
    2551
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Algorithms/Solvers/ScipSolver.cs

    r16234 r16288  
    1 using HeuristicLab.Core;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
    224using HeuristicLab.Data;
    325using HeuristicLab.MathematicalOptimization.LinearProgramming.Algorithms.Solvers.Base;
     
    1941    }
    2042
     43    [StorableConstructor]
     44    protected ScipSolver(bool deserializing)
     45      : base(deserializing) {
     46    }
     47
     48    protected ScipSolver(ScipSolver original, Cloner cloner)
     49      : base(original, cloner) {
     50    }
     51
    2152    public override bool SupportsPause => true;
    2253
     
    2455
    2556    protected override OptimizationProblemType OptimizationProblemType =>
    26               OptimizationProblemType.SCIP_MIXED_INTEGER_PROGRAMMING;
     57      OptimizationProblemType.SCIP_MIXED_INTEGER_PROGRAMMING;
    2758  }
    2859}
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/DoubleParam.cs

    r16233 r16288  
    1 namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
    223
    324  // Enumeration of parameters that take continuous values.
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/IncrementalityValues.cs

    r16233 r16288  
    1 namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
    223
    324  public enum IncrementalityValues {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/IntegerParam.cs

    r16233 r16288  
    1 namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
    223
    324  // Enumeration of parameters that take integer or categorical values.
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/LpAlgorithmValues.cs

    r16233 r16288  
    1 namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
    223
    324  public enum LpAlgorithmValues {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Problems/ILinearProgrammingProblemDefinition.cs

    r16233 r16288  
    11#region License Information
    2 
    32/* HeuristicLab
    43 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    22 #endregion License Information
     20#endregion
    2321
    2422using Google.OrTools.LinearSolver;
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Problems/LinearProgrammingProblem.cs

    r16233 r16288  
    11#region License Information
    2 
    32/* HeuristicLab
    43 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    22 #endregion License Information
     20#endregion
    2321
    2422using System.Drawing;
     
    4442    }
    4543
    46     private LinearProgrammingProblem(LinearProgrammingProblem original, Cloner cloner)
     44    protected LinearProgrammingProblem(LinearProgrammingProblem original, Cloner cloner)
    4745      : base(original, cloner) {
    4846      RegisterEvents();
     
    5048
    5149    [StorableConstructor]
    52     private LinearProgrammingProblem(bool deserializing) : base(deserializing) { }
     50    protected LinearProgrammingProblem(bool deserializing) : base(deserializing) { }
    5351
    5452    public new static Image StaticItemImage => VSImageLibrary.Script;
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Problems/LinearProgrammingProblemDefinitionScript.cs

    r16233 r16288  
    11#region License Information
    2 
    32/* HeuristicLab
    43 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    22 #endregion License Information
     20#endregion
    2321
    2422using System;
     
    3836  [StorableClass]
    3937  public sealed class LinearProgrammingProblemDefinitionScript : Script, ILinearProgrammingProblemDefinition, IStorableContent {
    40     protected bool SuppressEvents { get; set; }
     38    private bool SuppressEvents { get; set; }
    4139
    4240    [Storable]
    43     private VariableStore variableStore;
     41    private readonly VariableStore variableStore;
    4442
    4543    public VariableStore VariableStore => variableStore;
     
    4947
    5048    [StorableConstructor]
    51     protected LinearProgrammingProblemDefinitionScript(bool deserializing) : base(deserializing) { }
     49    private LinearProgrammingProblemDefinitionScript(bool deserializing) : base(deserializing) { }
    5250
    53     protected LinearProgrammingProblemDefinitionScript(LinearProgrammingProblemDefinitionScript original, Cloner cloner)
     51    private LinearProgrammingProblemDefinitionScript(LinearProgrammingProblemDefinitionScript original, Cloner cloner)
    5452      : base(original, cloner) {
    5553      variableStore = cloner.Clone(original.variableStore);
     
    6563    private volatile ILinearProgrammingProblemDefinition compiledProblemDefinition;
    6664
    67     protected ILinearProgrammingProblemDefinition CompiledProblemDefinition {
     65    private ILinearProgrammingProblemDefinition CompiledProblemDefinition {
    6866      get {
    6967        // double checked locking pattern
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Problems/LinearProgrammingProblemDefintion.cs

    r16233 r16288  
    1 using Google.OrTools.LinearSolver;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using Google.OrTools.LinearSolver;
    223using HeuristicLab.Problems.Programmable;
    324
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Problems/ProblemDefinitionScriptException.cs

    r16233 r16288  
    11#region License Information
    2 
    32/* HeuristicLab
    43 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    22 #endregion License Information
     20#endregion
    2321
    2422using System;
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Templates/CompiledLinearProgrammingProblemDefinition.cs

    r16233 r16288  
    1 using Google.OrTools.LinearSolver;
     1using System;
     2using System.Linq;
     3using System.Collections.Generic;
     4using Google.OrTools.LinearSolver;
     5using HeuristicLab.Common;
     6using HeuristicLab.Core;
    27using HeuristicLab.Data;
    38using HeuristicLab.MathematicalOptimization.LinearProgramming.Problems;
    49using HeuristicLab.Optimization;
    510using HeuristicLab.Problems.Programmable;
     11using Variable = Google.OrTools.LinearSolver.Variable;
    612
    713namespace HeuristicLab.MathematicalOptimization.LinearProgramming {
     
    1016    private Variable x;
    1117    private Variable y;
    12 
     18   
    1319    public override void Initialize() {
    1420      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
    1521      // Add additional initialization code e.g. private variables that you need for evaluating
    1622    }
    17 
     23   
    1824    public void BuildModel(Solver solver) {
    1925      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
     
    2733      solver.Maximize(x + 10 * y);
    2834    }
    29 
     35   
    3036    public void Analyze(Solver solver, ResultCollection results) {
    3137      // Use vars.yourVariable to access variables in the variable store i.e. yourVariable
     
    3743      //results.AddOrUpdateResult("y", new DoubleValue(solver.LookupVariableOrNull("y").SolutionValue()));
    3844    }
    39 
     45   
    4046    // Implement further classes and methods
    4147  }
    4248}
     49
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Views/LinearProgrammingProblemDefinitionScriptView.cs

    r16172 r16288  
    2828
    2929namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Views {
     30
    3031  [View("LinearProgrammingProblemDefinitionScriptView")]
    3132  [Content(typeof(LinearProgrammingProblemDefinitionScript), IsDefaultView = true)]
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/LinearProgramming/Views/LinearProgrammingProblemView.cs

    r16172 r16288  
    2828
    2929namespace HeuristicLab.MathematicalOptimization.LinearProgramming.Views {
     30
    3031  [View("Linear Programming Problem View")]
    3132  [Content(typeof(LinearProgrammingProblem), true)]
     
    7576
    7677    private void LinearProgrammingProblemView_Load(object sender, EventArgs e) {
    77 
    7878    }
    7979  }
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/Plugin.cs.frame

    r16234 r16288  
    2323
    2424namespace HeuristicLab.MathematicalOptimization {
     25
    2526  [Plugin("HeuristicLab.MathematicalOptimization", "Provides support for mathematical optimization based on Google OR-Tools", "3.3.15.$WCREV$")]
    2627  [PluginFile("HeuristicLab.MathematicalOptimization-3.3.dll", PluginFileType.Assembly)]
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/Properties/Settings.Designer.cs

    r16234 r16288  
    6262        [global::System.Configuration.UserScopedSettingAttribute()]
    6363        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    64         [global::System.Configuration.DefaultSettingValueAttribute("glpk465.dll")]
     64        [global::System.Configuration.DefaultSettingValueAttribute("glpk_4_65.dll")]
    6565        public string GlpkLibraryName {
    6666            get {
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/Properties/Settings.settings

    r16234 r16288  
    1313    </Setting>
    1414    <Setting Name="GlpkLibraryName" Type="System.String" Scope="User">
    15       <Value Profile="(Default)">glpk465.dll</Value>
     15      <Value Profile="(Default)">glpk_4_65.dll</Value>
    1616    </Setting>
    1717  </Settings>
  • branches/2931_OR-Tools_LP_MIP/HeuristicLab.MathematicalOptimization/3.3/app.config

    r16234 r16288  
    11<?xml version="1.0" encoding="utf-8" ?>
    22<configuration>
    3     <configSections>
    4         <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
    5             <section name="HeuristicLab.MathematicalOptimization.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    6         </sectionGroup>
    7     </configSections>
    8     <userSettings>
    9         <HeuristicLab.MathematicalOptimization.Properties.Settings>
    10             <setting name="ScipLibraryName" serializeAs="String">
    11                 <value>scip.dll</value>
    12             </setting>
    13             <setting name="GurobiLibraryName" serializeAs="String">
    14                 <value>gurobi80.dll</value>
    15             </setting>
    16             <setting name="CplexLibraryName" serializeAs="String">
    17                 <value>cplex1280.dll</value>
    18             </setting>
    19             <setting name="GlpkLibraryName" serializeAs="String">
    20                 <value>glpk465.dll</value>
    21             </setting>
    22         </HeuristicLab.MathematicalOptimization.Properties.Settings>
    23     </userSettings>
     3  <configSections>
     4    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     5      <section name="HeuristicLab.MathematicalOptimization.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
     6    </sectionGroup>
     7  </configSections>
     8  <userSettings>
     9    <HeuristicLab.MathematicalOptimization.Properties.Settings>
     10      <setting name="ScipLibraryName" serializeAs="String">
     11        <value>scip.dll</value>
     12      </setting>
     13      <setting name="GurobiLibraryName" serializeAs="String">
     14        <value>gurobi80.dll</value>
     15      </setting>
     16      <setting name="CplexLibraryName" serializeAs="String">
     17        <value>cplex1280.dll</value>
     18      </setting>
     19      <setting name="GlpkLibraryName" serializeAs="String">
     20        <value>glpk_4_65.dll</value>
     21      </setting>
     22    </HeuristicLab.MathematicalOptimization.Properties.Settings>
     23  </userSettings>
    2424</configuration>
Note: See TracChangeset for help on using the changeset viewer.