Changeset 11303
- Timestamp:
- 08/26/14 13:05:22 (10 years ago)
- Location:
- branches/HeuristicLab.Problems.Orienteering
- Files:
-
- 2 deleted
- 47 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering
- Property svn:mergeinfo changed
/trunk/sources merged: 11214,11241,11248-11251,11256,11263,11274,11280,11282-11283,11290,11292,11294-11296,11298,11300,11302
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchImprovementOperator.cs
r11185 r11303 38 38 [Item("LocalSearchImprovementOperator", "A local search improvement operator.")] 39 39 [StorableClass] 40 public sealed class LocalSearchImprovementOperator : SingleSuccessorOperator, ILocalImprovement Operator, IStochasticOperator {40 public sealed class LocalSearchImprovementOperator : SingleSuccessorOperator, ILocalImprovementAlgorithmOperator, IStochasticOperator { 41 41 #region IGenericLocalImprovementOperator Properties 42 42 public Type ProblemType { get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); } } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingImprovementOperator.cs
r11185 r11303 38 38 [Item("SimulatedAnnealingImprovementOperator", "A simulated annealing improvement operator.")] 39 39 [StorableClass] 40 public sealed class SimulatedAnnealingImprovementOperator : SingleSuccessorOperator, ILocalImprovement Operator, IStochasticOperator {40 public sealed class SimulatedAnnealingImprovementOperator : SingleSuccessorOperator, ILocalImprovementAlgorithmOperator, IStochasticOperator { 41 41 #region IGenericLocalImprovementOperator Properties 42 42 public Type ProblemType { get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); } } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearch.cs
r11247 r11303 283 283 private void ParameterizeLocalImprovementOperators() { 284 284 foreach (ILocalImprovementOperator op in LocalImprovementParameter.ValidValues) { 285 if (op != LocalImprovementParameter.Value) op.Problem = null;286 285 op.MaximumIterationsParameter.Value = null; 287 286 op.MaximumIterationsParameter.ActualName = LocalImprovementMaximumIterationsParameter.Name; 288 } 289 if (LocalImprovementParameter.Value != null) 290 LocalImprovementParameter.Value.Problem = Problem; 287 288 var algOp = op as ILocalImprovementAlgorithmOperator; 289 if (algOp != null && algOp != LocalImprovementParameter.Value) algOp.Problem = null; 290 } 291 if (LocalImprovementParameter.Value is ILocalImprovementAlgorithmOperator) 292 ((ILocalImprovementAlgorithmOperator)LocalImprovementParameter.Value).Problem = Problem; 291 293 } 292 294 private void InitializeLocalImprovementOperators() { 293 if (Problem == null) { 294 LocalImprovementParameter.ValidValues.Clear(); 295 } else { 296 foreach (var entry in LocalImprovementParameter.ValidValues.ToList()) { 297 if (!entry.ProblemType.IsAssignableFrom(Problem.GetType())) { 298 LocalImprovementParameter.ValidValues.Remove(entry); 299 } 300 } 301 foreach (var op in Problem.Operators.OfType<ILocalImprovementOperator>()) { 295 LocalImprovementParameter.ValidValues.Clear(); 296 if (Problem != null) { 297 // Regular ILocalImprovementOperators queried from Problem 298 foreach (var op in Problem.Operators.OfType<ILocalImprovementOperator>().Where(x => !(x is ILocalImprovementAlgorithmOperator))) { 302 299 LocalImprovementParameter.ValidValues.Add(op); 303 300 } 304 foreach (ILocalImprovementOperator op in ApplicationManager.Manager.GetInstances<ILocalImprovementOperator>().Where(x => x.ProblemType.IsAssignableFrom(Problem.GetType()))) { 305 if (!LocalImprovementParameter.ValidValues.Any(x => x.GetType() == op.GetType())) 301 // ILocalImprovementAlgorithmOperators queried from ApplicationManager 302 var algOps = ApplicationManager.Manager.GetInstances<ILocalImprovementAlgorithmOperator>() 303 .Where(x => x.ProblemType.IsInstanceOfType(Problem)); 304 foreach (var op in algOps) { 305 if (LocalImprovementParameter.ValidValues.All(x => x.GetType() != op.GetType())) 306 306 LocalImprovementParameter.ValidValues.Add(op); 307 307 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Core/3.3/Collections/DirectedGraph/Arc.cs
r11241 r11303 25 25 26 26 namespace HeuristicLab.Core { 27 /// <summary> 28 /// An arc that can have a weight, a label, and a data object for holding additional info 29 /// </summary> 27 [Item("Arc", "A graph arc connecting two graph vertices, that can have a weight, label, and data object for holding additional info")] 30 28 [StorableClass] 31 29 public class Arc : Item, IArc { … … 59 57 60 58 [Storable] 61 protected IDeepCloneabledata;62 public IDeepCloneableData {59 protected object data; 60 public object Data { 63 61 get { return data; } 64 62 set { … … 83 81 label = original.Label; 84 82 weight = original.Weight; 85 data = cloner.Clone(data); 83 if (data is IDeepCloneable) 84 data = cloner.Clone((IDeepCloneable)data); 85 else data = original.Data; 86 86 } 87 87 public override IDeepCloneable Clone(Cloner cloner) { return new Arc(this, cloner); } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Core/3.3/Collections/DirectedGraph/DirectedGraph.cs
r11241 r11303 57 57 vertices = new HashSet<IVertex>(original.vertices.Select(cloner.Clone)); 58 58 arcs = new HashSet<IArc>(original.arcs.Select(cloner.Clone)); 59 60 // add the arcs to the newly cloned vertices 61 foreach (var arc in arcs) { 62 arc.Source.AddArc(arc); 63 arc.Target.AddArc(arc); 64 } 59 65 } 60 66 … … 71 77 private void AfterDeserialization() { 72 78 foreach (var vertex in vertices) { 73 vertex.ArcAdded += OnArcAdded;74 vertex.ArcRemoved += OnArcRemoved;79 vertex.ArcAdded += Vertex_ArcAdded; 80 vertex.ArcRemoved += Vertex_ArcRemoved; 75 81 } 76 82 … … 89 95 90 96 public virtual void AddVertex(IVertex vertex) { 91 vertices.Add(vertex); 92 // register event handlers 93 vertex.ArcAdded += OnArcAdded; 94 vertex.ArcRemoved += OnArcRemoved; 97 if (!vertices.Contains(vertex) && vertex.Degree > 0) 98 throw new ArgumentException("New vertices cannot have any arcs."); 99 100 if (vertices.Add(vertex)) { 101 // register event handlers 102 vertex.ArcAdded += Vertex_ArcAdded; 103 vertex.ArcRemoved += Vertex_ArcRemoved; 104 OnVertedAdded(this, new EventArgs<IVertex>(vertex)); 105 } 95 106 } 96 107 … … 102 113 RemoveArc(arc); 103 114 // deregister event handlers 104 vertex.ArcAdded -= OnArcAdded; 105 vertex.ArcRemoved -= OnArcRemoved; 115 vertex.ArcAdded -= Vertex_ArcAdded; 116 vertex.ArcRemoved -= Vertex_ArcRemoved; 117 OnVertexRemoved(this, new EventArgs<IVertex>(vertex)); 106 118 } 107 119 … … 128 140 } 129 141 130 public event EventHandler ArcAdded; 131 protected virtual void OnArcAdded(object sender, EventArgs<IArc> args) { 142 protected virtual void Vertex_ArcAdded(object sender, EventArgs<IArc> args) { 143 // the ArcAdded event is fired by a vertex when an arc from/to another vertex is added to its list of connections 144 // because the arc is added in both directions by both the source and the target, this event will get fired twice here 132 145 var arc = args.Value; 133 // the ArcAdded event is fired by a vertex when an arc from or towards another vertex is added to his list of connections 134 // because the arc is added in both directions by both the source and the target, this event will get fired twice 135 // here, we only want to add the arc once, so if its already contained, we return without complaining 136 if (arcs.Contains(arc)) return; 137 arcs.Add(arc); 146 if (arcs.Add(arc)) OnArcAdded(this, new EventArgs<IArc>(arc)); 138 147 } 139 148 140 141 public event EventHandler ArcRemoved; 142 protected virtual void OnArcRemoved(object sender, EventArgs<IArc> args) { 149 protected virtual void Vertex_ArcRemoved(object sender, EventArgs<IArc> args) { 143 150 var arc = args.Value; 144 if (!arcs.Contains(arc)) return; // the same rationale as above 145 arcs.Remove(arc); 151 if (arcs.Remove(arc)) OnArcRemoved(this, new EventArgs<IArc>(arc)); 146 152 } 147 153 148 154 // events 149 public event EventHandler VertexAdded; 150 public event EventHandler VertexRemoved; 155 public event EventHandler<EventArgs<IVertex>> VertexAdded; 156 protected virtual void OnVertedAdded(object sender, EventArgs<IVertex> args) { 157 var added = VertexAdded; 158 if (added != null) 159 added(sender, args); 160 } 161 162 public event EventHandler<EventArgs<IVertex>> VertexRemoved; 163 protected virtual void OnVertexRemoved(object sender, EventArgs<IVertex> args) { 164 var removed = VertexRemoved; 165 if (removed != null) 166 removed(sender, args); 167 } 168 169 public event EventHandler<EventArgs<IArc>> ArcAdded; 170 protected virtual void OnArcAdded(object sender, EventArgs<IArc> args) { 171 var added = ArcAdded; 172 if (added != null) 173 added(sender, args); 174 } 175 176 public event EventHandler<EventArgs<IArc>> ArcRemoved; 177 protected virtual void OnArcRemoved(object sender, EventArgs<IArc> args) { 178 var removed = ArcRemoved; 179 if (removed != null) 180 removed(sender, args); 181 } 151 182 } 152 183 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Core/3.3/Collections/DirectedGraph/Vertex.cs
r11241 r11303 27 27 28 28 namespace HeuristicLab.Core { 29 [Item("Vertex", "An object representing a vertex in the graph. It can have a text label, a weight, and an additional data object.")] 29 30 [StorableClass] 30 31 public class Vertex : Item, IVertex { … … 92 93 weight = original.Weight; 93 94 94 inArcs = original.InArcs.Select(cloner.Clone).ToList(); 95 outArcs = original.OutArcs.Select(cloner.Clone).ToList(); 95 // we do not clone the arcs here (would cause too much recursion and ultimately a stack overflow) 96 96 } 97 97 … … 102 102 public void AddArc(IArc arc) { 103 103 if (this != arc.Source && this != arc.Target) 104 throw new InvalidOperationException("The current vertex must be either the arc source or the arc target."); 104 throw new ArgumentException("The current vertex must be either the arc source or the arc target."); 105 106 if (arc.Source == arc.Target) 107 throw new ArgumentException("Arc source and target must be different."); 105 108 106 109 if (this == arc.Source) { … … 117 120 public void RemoveArc(IArc arc) { 118 121 if (this != arc.Source && this != arc.Target) 119 throw new InvalidOperationException("The current vertex must be either the arc source or the arc target.");122 throw new ArgumentException("The current vertex must be either the arc source or the arc target."); 120 123 121 124 if (this == arc.Source) { … … 167 170 } 168 171 172 public Vertex(IDeepCloneable data) 173 : base(data) { 174 } 175 169 176 public override IDeepCloneable Clone(Cloner cloner) { 170 177 return new Vertex<T>(this, cloner); -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
r10291 r11303 116 116 <Compile Include="Collections\CheckedItemCollection.cs" /> 117 117 <Compile Include="Collections\CheckedItemList.cs" /> 118 <Compile Include="Collections\DirectedGraph\Arc.cs" /> 119 <Compile Include="Collections\DirectedGraph\DirectedGraph.cs" /> 120 <Compile Include="Collections\DirectedGraph\Vertex.cs" /> 118 121 <Compile Include="Collections\ReadOnlyCheckedItemCollection.cs" /> 119 122 <Compile Include="Collections\ReadOnlyCheckedItemList.cs"> … … 148 151 <Compile Include="Constraints\IConstraint.cs" /> 149 152 <Compile Include="Constraints\TypeCompatibilityConstraint.cs" /> 153 <Compile Include="Interfaces\DirectedGraph\IArc.cs" /> 154 <Compile Include="Interfaces\DirectedGraph\IDirectedGraph.cs" /> 155 <Compile Include="Interfaces\DirectedGraph\IVertex.cs" /> 150 156 <Compile Include="Interfaces\ICheckedMultiOperator.cs" /> 151 157 <Compile Include="Interfaces\IConstrainedValueParameter.cs" /> -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Core/3.3/Interfaces/DirectedGraph/IArc.cs
r11241 r11303 21 21 22 22 using System; 23 using HeuristicLab.Common;24 23 25 24 namespace HeuristicLab.Core { … … 29 28 string Label { get; set; } 30 29 double Weight { get; set; } 31 IDeepCloneableData { get; set; }30 object Data { get; set; } 32 31 33 32 event EventHandler Changed; // generic event for when the label, weight or data were changed -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Core/3.3/Interfaces/DirectedGraph/IDirectedGraph.cs
r11241 r11303 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 24 25 25 26 namespace HeuristicLab.Core { … … 34 35 IEnumerable<IArc> Arcs { get; } 35 36 36 event EventHandler VertexAdded;37 event EventHandler VertexRemoved;38 event EventHandler ArcAdded;39 event EventHandler ArcRemoved;37 event EventHandler<EventArgs<IVertex>> VertexAdded; 38 event EventHandler<EventArgs<IVertex>> VertexRemoved; 39 event EventHandler<EventArgs<IArc>> ArcAdded; 40 event EventHandler<EventArgs<IArc>> ArcRemoved; 40 41 } 41 42 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs
r11185 r11303 21 21 22 22 using System.Windows.Forms; 23 using HeuristicLab.Core;24 using HeuristicLab.Core.Views;25 23 using HeuristicLab.MainForm; 26 24 using HeuristicLab.Optimization; 27 25 using HeuristicLab.Problems.DataAnalysis; 28 26 using HeuristicLab.Problems.DataAnalysis.Views; 29 using View = HeuristicLab.MainForm.WindowsForms.View;30 27 31 28 namespace HeuristicLab.DataPreprocessing.Views { 32 29 public class DataPreprocessorStarter : IDataPreprocessorStarter { 33 30 34 public void Start(IDataAnalysisProblemData problemData, View currentView) {31 public void Start(IDataAnalysisProblemData problemData, IContentView currentView) { 35 32 IAlgorithm algorithm; 36 33 IDataAnalysisProblem problem; 37 IItem parentItem = GetMostOuterContent(currentView, out algorithm, out problem);34 GetMostOuterContent(currentView as Control, out algorithm, out problem); 38 35 var context = new PreprocessingContext(problemData, algorithm, problem); 39 36 MainFormManager.MainForm.ShowContent(context); 40 37 } 41 38 42 private IItemGetMostOuterContent(Control control, out IAlgorithm algorithm, out IDataAnalysisProblem problem) {39 private void GetMostOuterContent(Control control, out IAlgorithm algorithm, out IDataAnalysisProblem problem) { 43 40 algorithm = null; 44 41 problem = null; 45 ItemView itemView = null; 46 do { 42 43 while (control != null) { 44 IContentView contentView = control as IContentView; 45 if (contentView != null) { 46 algorithm = contentView.Content as IAlgorithm; 47 problem = contentView.Content as IDataAnalysisProblem; 48 } 47 49 control = control.Parent; 48 if (control is ItemView) { 49 itemView = (ItemView)control; 50 if (itemView.Content is IAlgorithm) { 51 algorithm = (IAlgorithm)itemView.Content; 52 } 53 if (itemView.Content is IDataAnalysisProblem) { 54 problem = (IDataAnalysisProblem)itemView.Content; 55 } 56 } 57 } while (control != null); 58 59 return itemView.Content; 50 } 60 51 } 61 52 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.ExtLibs
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.ExtLibs merged: 11298
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.ExtLibs.sln
r11127 r11303 303 303 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 304 304 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|Any CPU.Build.0 = Debug|Any CPU 305 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|x64.ActiveCfg = Debug|Any CPU 306 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|x86.ActiveCfg = Debug|Any CPU 305 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|x64.ActiveCfg = Debug|x64 306 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|x64.Build.0 = Debug|x64 307 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|x86.ActiveCfg = Debug|x86 308 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|x86.Build.0 = Debug|x86 307 309 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|Any CPU.ActiveCfg = Release|Any CPU 308 310 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|Any CPU.Build.0 = Release|Any CPU 309 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|x64.ActiveCfg = Release|Any CPU 310 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|x86.ActiveCfg = Release|Any CPU 311 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|x64.ActiveCfg = Release|x64 312 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|x64.Build.0 = Release|x64 313 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|x86.ActiveCfg = Release|x86 314 {F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|x86.Build.0 = Release|x86 311 315 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 312 316 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Debug|Any CPU.Build.0 = Debug|Any CPU 313 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Debug|x64.ActiveCfg = Debug|Any CPU 314 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Debug|x86.ActiveCfg = Debug|Any CPU 317 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Debug|x64.ActiveCfg = Debug|x64 318 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Debug|x64.Build.0 = Debug|x64 319 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Debug|x86.ActiveCfg = Debug|x86 320 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Debug|x86.Build.0 = Debug|x86 315 321 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|Any CPU.ActiveCfg = Release|Any CPU 316 322 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|Any CPU.Build.0 = Release|Any CPU 317 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x64.ActiveCfg = Release|Any CPU 318 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x86.ActiveCfg = Release|Any CPU 323 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x64.ActiveCfg = Release|x64 324 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x64.Build.0 = Release|x64 325 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x86.ActiveCfg = Release|x86 326 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x86.Build.0 = Release|x86 319 327 EndGlobalSection 320 328 GlobalSection(SolutionProperties) = preSolution -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/HeuristicLab.DotNetScilab-1.0.csproj
r11075 r11303 36 36 <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile> 37 37 </PropertyGroup> 38 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> 39 <DebugSymbols>true</DebugSymbols> 40 <OutputPath>..\..\..\..\bin\</OutputPath> 41 <DefineConstants>DEBUG;TRACE</DefineConstants> 42 <DebugType>full</DebugType> 43 <PlatformTarget>x64</PlatformTarget> 44 <ErrorReport>prompt</ErrorReport> 45 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 46 </PropertyGroup> 47 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> 48 <OutputPath>..\..\..\..\bin\</OutputPath> 49 <DefineConstants>TRACE</DefineConstants> 50 <Optimize>true</Optimize> 51 <DebugType>pdbonly</DebugType> 52 <PlatformTarget>x64</PlatformTarget> 53 <ErrorReport>prompt</ErrorReport> 54 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 55 </PropertyGroup> 56 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 57 <DebugSymbols>true</DebugSymbols> 58 <OutputPath>..\..\..\..\bin\</OutputPath> 59 <DefineConstants>DEBUG;TRACE</DefineConstants> 60 <DebugType>full</DebugType> 61 <PlatformTarget>x86</PlatformTarget> 62 <ErrorReport>prompt</ErrorReport> 63 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 64 </PropertyGroup> 65 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 66 <OutputPath>..\..\..\..\bin\</OutputPath> 67 <DefineConstants>TRACE</DefineConstants> 68 <Optimize>true</Optimize> 69 <DebugType>pdbonly</DebugType> 70 <PlatformTarget>x86</PlatformTarget> 71 <ErrorReport>prompt</ErrorReport> 72 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 73 </PropertyGroup> 38 74 <ItemGroup> 39 75 <Reference Include="System" /> … … 71 107 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 72 108 <PropertyGroup> 73 <PreBuildEvent >set Path=%25Path%25;$(ProjectDir);$(SolutionDir)109 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 74 110 set ProjectDir=$(ProjectDir) 75 111 set SolutionDir=$(SolutionDir) 76 112 set Outdir=$(Outdir) 77 113 78 call PreBuildEvent.cmd</PreBuildEvent> 114 call PreBuildEvent.cmd 115 </PreBuildEvent> 116 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 117 export ProjectDir=$(ProjectDir) 118 export SolutionDir=$(SolutionDir) 119 120 $SolutionDir/PreBuildEvent.sh 121 </PreBuildEvent> 79 122 </PropertyGroup> 80 123 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.ExtLibs/HeuristicLab.MatlabConnector/1.0/HeuristicLab.MatlabConnector-1.0/HeuristicLab.MatlabConnector-1.0.csproj
r11128 r11303 35 35 <PropertyGroup> 36 36 <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile> 37 </PropertyGroup> 38 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> 39 <DebugSymbols>true</DebugSymbols> 40 <OutputPath>..\..\..\..\bin\</OutputPath> 41 <DefineConstants>DEBUG;TRACE</DefineConstants> 42 <DebugType>full</DebugType> 43 <PlatformTarget>x64</PlatformTarget> 44 <ErrorReport>prompt</ErrorReport> 45 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 46 </PropertyGroup> 47 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> 48 <OutputPath>..\..\..\..\bin\</OutputPath> 49 <DefineConstants>TRACE</DefineConstants> 50 <Optimize>true</Optimize> 51 <DebugType>pdbonly</DebugType> 52 <PlatformTarget>x64</PlatformTarget> 53 <ErrorReport>prompt</ErrorReport> 54 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 55 </PropertyGroup> 56 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 57 <DebugSymbols>true</DebugSymbols> 58 <OutputPath>..\..\..\..\bin\</OutputPath> 59 <DefineConstants>DEBUG;TRACE</DefineConstants> 60 <DebugType>full</DebugType> 61 <PlatformTarget>x86</PlatformTarget> 62 <ErrorReport>prompt</ErrorReport> 63 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 64 </PropertyGroup> 65 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 66 <OutputPath>..\..\..\..\bin\</OutputPath> 67 <DefineConstants>TRACE</DefineConstants> 68 <Optimize>true</Optimize> 69 <DebugType>pdbonly</DebugType> 70 <PlatformTarget>x86</PlatformTarget> 71 <ErrorReport>prompt</ErrorReport> 72 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 37 73 </PropertyGroup> 38 74 <ItemGroup> -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
r9438 r11303 114 114 </ItemGroup> 115 115 <ItemGroup> 116 <Compile Include="Interfaces\ILocalImprovementAlgorithmOperator.cs" /> 116 117 <Compile Include="Interfaces\ISingleObjectivePathRelinker.cs" /> 117 118 <Compile Include="Interfaces\ISingleObjectiveImprovementOperator.cs" /> -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Optimization/3.3/Interfaces/ILocalImprovementOperator.cs
r11185 r11303 20 20 #endregion 21 21 22 using System;23 22 using HeuristicLab.Core; 24 23 using HeuristicLab.Data; … … 26 25 namespace HeuristicLab.Optimization { 27 26 public interface ILocalImprovementOperator : IOperator { 28 Type ProblemType { get; }29 IProblem Problem { get; set; }30 27 IValueLookupParameter<IntValue> MaximumIterationsParameter { get; } 31 28 ILookupParameter<IntValue> EvaluatedSolutionsParameter { get; } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis.Trading/3.4/InstanceProviders/CsvProblemInstanceProvider.cs
r11185 r11303 21 21 22 22 using System; 23 using System.Collections;24 23 using System.Collections.Generic; 25 24 using System.IO; … … 40 39 } 41 40 public override Uri WebLink { 42 get { return new Uri("http://dev.heuristiclab.com/trac /hl/core/wiki/UsersFAQ#DataAnalysisImportFileFormat"); }41 get { return new Uri("http://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/FAQ#DataAnalysisImportFileFormat"); } 43 42 } 44 43 public override string ReferencePublication { -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Views merged: 11214
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IDataPreprocessorStarter.cs
r11185 r11303 20 20 #endregion 21 21 22 using HeuristicLab.MainForm .WindowsForms;22 using HeuristicLab.MainForm; 23 23 24 24 namespace HeuristicLab.Problems.DataAnalysis.Views { 25 25 public interface IDataPreprocessorStarter { 26 void Start(IDataAnalysisProblemData problemData, View currentView);26 void Start(IDataAnalysisProblemData problemData, IContentView currentView); 27 27 } 28 28 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis merged: 11274,11283
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/CSV/ClassifiactionCSVInstanceProvider.cs
r11185 r11303 39 39 } 40 40 public override Uri WebLink { 41 get { return new Uri("http://dev.heuristiclab.com/trac /hl/core/wiki/UsersFAQ#DataAnalysisImportFileFormat"); }41 get { return new Uri("http://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/FAQ#DataAnalysisImportFileFormat"); } 42 42 } 43 43 public override string ReferencePublication { -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Clustering/CSV/ClusteringCSVInstanceProvider.cs
r11185 r11303 39 39 } 40 40 public override Uri WebLink { 41 get { return new Uri("http://dev.heuristiclab.com/trac /hl/core/wiki/UsersFAQ#DataAnalysisImportFileFormat"); }41 get { return new Uri("http://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/FAQ#DataAnalysisImportFileFormat"); } 42 42 } 43 43 public override string ReferencePublication { -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/CSV/RegressionCSVInstanceProvider.cs
r11185 r11303 39 39 } 40 40 public override Uri WebLink { 41 get { return new Uri("http://dev.heuristiclab.com/trac /hl/core/wiki/UsersFAQ#DataAnalysisImportFileFormat"); }41 get { return new Uri("http://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/FAQ#DataAnalysisImportFileFormat"); } 42 42 } 43 43 public override string ReferencePublication { -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.DataAnalysis/3.3/TableFileParser.cs
r11185 r11303 169 169 //create columns 170 170 for (int col = 0; col < columns; col++) { 171 var types = rowValues.Select(r => r[col]).Where(v => v != null && v as string != string.Empty).Take(10 ).Select(v => v.GetType());171 var types = rowValues.Select(r => r[col]).Where(v => v != null && v as string != string.Empty).Take(100).Select(v => v.GetType()); 172 172 if (!types.Any()) { 173 173 values.Add(new List<string>()); … … 193 193 values[columnIndex].Add(DateTime.MinValue); 194 194 else if (values[columnIndex] is List<string> && !(element is string)) 195 values[columnIndex].Add( string.Empty);195 values[columnIndex].Add(element.ToString()); 196 196 else 197 197 values[columnIndex].Add(element); -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.DataAnalysis/3.3/TimeSeries/CSV/TimeSeriesPrognosisCSVInstanceProvider.cs
r11185 r11303 39 39 } 40 40 public override Uri WebLink { 41 get { return new Uri("http://dev.heuristiclab.com/trac /hl/core/wiki/UsersFAQ#DataAnalysisImportFileFormat"); }41 get { return new Uri("http://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/FAQ#DataAnalysisImportFileFormat"); } 42 42 } 43 43 public override string ReferencePublication { -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs
r11289 r11303 23 23 24 24 namespace HeuristicLab.Problems.Instances.VehicleRouting { 25 public abstract class CordeauFormatInstanceProvider : VRPInstanceProvider<MDCVRPTWData>{26 protected override MDCVRPTWDataLoadData(Stream stream) {25 public abstract class CordeauFormatInstanceProvider<T> : VRPInstanceProvider<T> where T : MDCVRPData { 26 protected override T LoadData(Stream stream) { 27 27 return LoadInstance(new CordeauParser(stream)); 28 28 } … … 31 31 get { return true; } 32 32 } 33 public override MDCVRPTWDataImportData(string path) {33 public override T ImportData(string path) { 34 34 return LoadInstance(new CordeauParser(path)); 35 35 } 36 36 37 private MDCVRPTWData LoadInstance(CordeauParser parser) { 38 parser.Parse(); 39 40 var instance = new MDCVRPTWData(); 41 instance.Dimension = parser.Cities + 1; 42 instance.Depots = parser.Depots; 43 instance.Coordinates = parser.Coordinates; 44 instance.Capacity = parser.Capacity; 45 instance.Demands = parser.Demands; 46 instance.DistanceMeasure = DistanceMeasure.Euclidean; 47 instance.ReadyTimes = parser.Readytimes; 48 instance.ServiceTimes = parser.Servicetimes; 49 instance.DueTimes = parser.Duetimes; 50 instance.MaximumVehicles = parser.Vehicles; 51 52 int depots = parser.Depots; 53 int vehicles = parser.Vehicles / parser.Depots; 54 instance.VehicleDepotAssignment = new int[depots * vehicles]; 55 int index = 0; 56 57 for (int i = 0; i < depots; i++) 58 for (int j = 0; j < vehicles; j++) { 59 instance.VehicleDepotAssignment[index] = i; 60 index++; 61 } 62 63 instance.Name = parser.ProblemName; 64 65 return instance; 66 } 37 internal abstract T LoadInstance(CordeauParser parser); 67 38 } 68 39 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.VehicleRouting/3.4/HeuristicLab.Problems.Instances.VehicleRouting-3.4.csproj
r8624 r11303 103 103 <ItemGroup> 104 104 <Reference Include="ICSharpCode.SharpZipLib"> 105 106 107 105 <HintPath>..\..\HeuristicLab.PluginInfrastructure\3.3\ICSharpCode.SharpZipLib.dll</HintPath> 106 <Private>False</Private> 107 </Reference> 108 108 <Reference Include="System" /> 109 109 <Reference Include="System.Core" /> … … 111 111 </ItemGroup> 112 112 <ItemGroup> 113 <Compile Include="CordeauFormat\CordeauMDTWInstanceProvider.cs" /> 113 114 <Compile Include="GoldenFormat\ChristofidesInstanceProvider.cs" /> 114 115 <Compile Include="GoldenFormat\KytojokiInstanceProvider.cs" /> … … 122 123 <Compile Include="TSPLibFormat\AugeratInstanceProvider.cs" /> 123 124 <Compile Include="TSPLibFormat\ChristofidesEilonInstanceProvider.cs" /> 124 <Compile Include="CordeauFormat\Cordeau InstanceProvider.cs" />125 <Compile Include="CordeauFormat\CordeauMDInstanceProvider.cs" /> 125 126 <Compile Include="CordeauFormat\CordeauFormatInstanceProvider.cs" /> 126 127 <Compile Include="LiLimFormat\LiLimInstanceProvider.cs" /> … … 142 143 <EmbeddedResource Include="Data\Homberger.zip" /> 143 144 <EmbeddedResource Include="Data\LiLim.zip" /> 144 <EmbeddedResource Include="Data\Cordeau.zip" />145 145 <EmbeddedResource Include="Data\Golden.zip" /> 146 146 <EmbeddedResource Include="Data\Christofides.zip" /> … … 148 148 <EmbeddedResource Include="Data\Taillard.opt.zip" /> 149 149 <EmbeddedResource Include="Data\Taillard.zip" /> 150 <EmbeddedResource Include="Data\CordeauMD.zip" /> 151 <EmbeddedResource Include="Data\CordeauMDTW.zip" /> 150 152 <None Include="Plugin.cs.frame" /> 151 153 <Compile Include="Plugin.cs" /> … … 180 182 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 181 183 <PropertyGroup> 182 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)184 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 183 185 set ProjectDir=$(ProjectDir) 184 186 set SolutionDir=$(SolutionDir) … … 186 188 187 189 call PreBuildEvent.cmd</PreBuildEvent> 188 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">190 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 189 191 export ProjectDir=$(ProjectDir) 190 192 export SolutionDir=$(SolutionDir) -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimInstanceProvider.cs
r11185 r11303 37 37 get { return "LiLim test set"; } 38 38 } 39 39 40 40 public override Uri WebLink { 41 get { return new Uri(@"http://www.sintef.no/Projectweb/TOP/P roblems/PDPTW/Li--Lim-benchmark/"); }41 get { return new Uri(@"http://www.sintef.no/Projectweb/TOP/PDPTW/Li--Lim-benchmark/"); } 42 42 } 43 43 -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/HombergerInstanceProvider.cs
r11185 r11303 37 37 get { return "Homberger test set"; } 38 38 } 39 39 40 40 public override Uri WebLink { 41 get { return new Uri(@"http://www. fernuni-hagen.de/WINF/touren/inhalte/probinst.htm"); }41 get { return new Uri(@"http://www.sintef.no/Projectweb/TOP/VRPTW/Homberger-benchmark/"); } 42 42 } 43 43 -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPInstanceProvider.cs
r11289 r11303 93 93 routes.Add(route); 94 94 } 95 96 if (line.StartsWith("Solution")) { 97 if (routes.Any()) { 98 // Skip remaining solutions since only one "best solution" is stored 99 break; 100 } 101 } 95 102 } 96 103 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Improvers/OrienteeringLocalImprovementOperator.cs
r11245 r11303 38 38 [StorableClass] 39 39 public class OrienteeringLocalImprovementOperator : SingleSuccessorOperator, ILocalImprovementOperator { 40 #region IGenericLocalImprovementOperator Properties41 public Type ProblemType { get { return typeof(OrienteeringProblem); } }42 43 public OrienteeringProblem Problem {44 get { return problem; }45 set { ((ILocalImprovementOperator)this).Problem = value; }46 }47 IProblem ILocalImprovementOperator.Problem {48 get { return problem; }49 set {50 if (problem != value) {51 if (value != null && !(value is OrienteeringProblem))52 throw new ArgumentException("Only problems of type " + ProblemType.ToString() + " can be assigned.");53 problem = (OrienteeringProblem)value;54 }55 }56 }57 #endregion58 59 [Storable]60 private OrienteeringProblem problem;61 40 62 41 #region Parameter Properties … … 111 90 private OrienteeringLocalImprovementOperator(OrienteeringLocalImprovementOperator original, Cloner cloner) 112 91 : base(original, cloner) { 113 this.problem = cloner.Clone(original.problem);114 92 } 115 93 public OrienteeringLocalImprovementOperator() -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs
r11284 r11303 269 269 ParameterizeAnalyzer(); 270 270 271 Operators.Add(new OrienteeringLocalImprovementOperator()); 271 272 Operators.Add(new OrienteeringShakingOperator()); 272 273 ParameterizeOperators(); -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.QuadraticAssignment
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.QuadraticAssignment merged: 11300
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.QuadraticAssignment/3.3/LocalImprovement/QAPExhaustiveInsertionLocalImprovement.cs
r11185 r11303 35 35 [StorableClass] 36 36 public class QAPExhaustiveInsertionLocalImprovement : SingleSuccessorOperator, ILocalImprovementOperator { 37 38 public Type ProblemType {39 get { return typeof(QuadraticAssignmentProblem); }40 }41 42 [Storable]43 private QuadraticAssignmentProblem problem;44 public IProblem Problem {45 get { return problem; }46 set { problem = (QuadraticAssignmentProblem)value; }47 }48 37 49 38 public ILookupParameter<IntValue> LocalIterationsParameter { … … 87 76 protected QAPExhaustiveInsertionLocalImprovement(QAPExhaustiveInsertionLocalImprovement original, Cloner cloner) 88 77 : base(original, cloner) { 89 this.problem = cloner.Clone(original.problem);90 78 } 91 79 public QAPExhaustiveInsertionLocalImprovement() -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.QuadraticAssignment/3.3/LocalImprovement/QAPExhaustiveInversionLocalImprovement.cs
r11185 r11303 35 35 [StorableClass] 36 36 public class QAPExhaustiveInversionLocalImprovement : SingleSuccessorOperator, ILocalImprovementOperator { 37 38 public Type ProblemType {39 get { return typeof(QuadraticAssignmentProblem); }40 }41 42 [Storable]43 private QuadraticAssignmentProblem problem;44 public IProblem Problem {45 get { return problem; }46 set { problem = (QuadraticAssignmentProblem)value; }47 }48 37 49 38 public ILookupParameter<IntValue> LocalIterationsParameter { … … 87 76 protected QAPExhaustiveInversionLocalImprovement(QAPExhaustiveInversionLocalImprovement original, Cloner cloner) 88 77 : base(original, cloner) { 89 this.problem = cloner.Clone(original.problem);90 78 } 91 79 public QAPExhaustiveInversionLocalImprovement() -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.QuadraticAssignment/3.3/LocalImprovement/QAPExhaustiveSwap2LocalImprovement.cs
r11185 r11303 35 35 [StorableClass] 36 36 public class QAPExhaustiveSwap2LocalImprovement : SingleSuccessorOperator, ILocalImprovementOperator { 37 38 public Type ProblemType {39 get { return typeof(QuadraticAssignmentProblem); }40 }41 42 [Storable]43 private QuadraticAssignmentProblem problem;44 public IProblem Problem {45 get { return problem; }46 set { problem = (QuadraticAssignmentProblem)value; }47 }48 37 49 38 public ILookupParameter<IntValue> LocalIterationsParameter { … … 91 80 protected QAPExhaustiveSwap2LocalImprovement(QAPExhaustiveSwap2LocalImprovement original, Cloner cloner) 92 81 : base(original, cloner) { 93 this.problem = cloner.Clone(original.problem);94 82 } 95 83 public QAPExhaustiveSwap2LocalImprovement() -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.QuadraticAssignment/3.3/LocalImprovement/QAPStochasticScrambleLocalImprovement.cs
r11185 r11303 35 35 [StorableClass] 36 36 public class QAPStochasticScrambleLocalImprovement : SingleSuccessorOperator, ILocalImprovementOperator, IStochasticOperator { 37 38 public Type ProblemType {39 get { return typeof(QuadraticAssignmentProblem); }40 }41 42 [Storable]43 private QuadraticAssignmentProblem problem;44 public IProblem Problem {45 get { return problem; }46 set { problem = (QuadraticAssignmentProblem)value; }47 }48 37 49 38 public ILookupParameter<IntValue> LocalIterationsParameter { … … 95 84 protected QAPStochasticScrambleLocalImprovement(QAPStochasticScrambleLocalImprovement original, Cloner cloner) 96 85 : base(original, cloner) { 97 this.problem = cloner.Clone(original.problem);98 86 } 99 87 public QAPStochasticScrambleLocalImprovement() -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs
r11185 r11303 302 302 Operators.Add(new QAPAlleleFrequencyAnalyzer()); 303 303 Operators.Add(new QAPPopulationDiversityAnalyzer()); 304 305 Operators.Add(new QAPExhaustiveInsertionLocalImprovement()); 306 Operators.Add(new QAPExhaustiveInversionLocalImprovement()); 307 Operators.Add(new QAPStochasticScrambleLocalImprovement()); 304 308 Operators.Add(new QAPExhaustiveSwap2LocalImprovement()); 309 305 310 Operators.Add(new QAPSimilarityCalculator()); 306 311 ParameterizeAnalyzers(); -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views merged: 11290
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman.Views/3.3/PathTSPTourView.cs
r11185 r11303 111 111 Point[] tour = new Point[permutation.Length]; 112 112 for (int i = 0; i < permutation.Length; i++) { 113 tour[i] = points[permutation[i]]; 113 if (permutation[i] >= 0 && permutation[i] < points.Length) 114 tour[i] = points[permutation[i]]; 114 115 } 115 116 graphics.DrawPolygon(Pens.Black, tour); -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting merged: 11300,11302
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/LocalImprovement/AlbaLambdaInterchangeLocalImprovementOperator.cs
r11185 r11303 37 37 [StorableClass] 38 38 public class AlbaLambdaInterchangeLocalImprovementOperator : VRPOperator, IStochasticOperator, ILocalImprovementOperator { 39 public Type ProblemType {40 get { return typeof(VehicleRoutingProblem); }41 }42 43 [Storable]44 private VehicleRoutingProblem problem;45 public IProblem Problem {46 get { return problem; }47 set { problem = (VehicleRoutingProblem)value; }48 }49 39 50 40 public IValueLookupParameter<IntValue> MaximumIterationsParameter { … … 84 74 protected AlbaLambdaInterchangeLocalImprovementOperator(AlbaLambdaInterchangeLocalImprovementOperator original, Cloner cloner) 85 75 : base(original, cloner) { 86 this.problem = cloner.Clone(original.problem);87 76 } 88 77 public AlbaLambdaInterchangeLocalImprovementOperator() … … 102 91 } 103 92 104 public static void Apply(AlbaEncoding solution, int maxIterations, 93 public static void Apply(AlbaEncoding solution, int maxIterations, 105 94 int lambda, int samples, IRandom random, IVRPProblemInstance problemInstance, ref double quality, out int evaluatedSolutions) { 106 95 evaluatedSolutions = 0; … … 120 109 } 121 110 } 122 if (bestMove != null) 111 if (bestMove != null) 123 112 AlbaLambdaInterchangeMoveMaker.Apply(solution, bestMove); 124 113 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs
r11289 r11303 33 33 using HeuristicLab.PluginInfrastructure; 34 34 using HeuristicLab.Problems.Instances; 35 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 35 36 using HeuristicLab.Problems.VehicleRouting.Interfaces; 36 37 using HeuristicLab.Problems.VehicleRouting.Interpreters; … … 263 264 defaultCreator = creator; 264 265 } 266 Operators.Add(new AlbaLambdaInterchangeLocalImprovementOperator()); 265 267 if (defaultCreator != null) 266 268 solutionCreatorParameter.Value = defaultCreator;
Note: See TracChangeset
for help on using the changeset viewer.