Index: /branches/BinPackingExtension/BinPacking.sln
===================================================================
--- /branches/BinPackingExtension/BinPacking.sln	(revision 14837)
+++ /branches/BinPackingExtension/BinPacking.sln	(revision 14838)
@@ -4,5 +4,43 @@
 VisualStudioVersion = 14.0.25420.1
 MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.BinPacking-3.3", "HeuristicLab.Problems.BinPacking\3.3\HeuristicLab.Problems.BinPacking-3.3.csproj", "{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.BinPacking.Views-3.3", "HeuristicLab.Problems.BinPacking.Views\3.3\HeuristicLab.Problems.BinPacking.Views-3.3.csproj", "{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}"
+EndProject
 Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Debug|x64.ActiveCfg = Debug|x64
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Debug|x64.Build.0 = Debug|x64
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Debug|x86.ActiveCfg = Debug|x86
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Debug|x86.Build.0 = Debug|x86
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Release|x64.ActiveCfg = Release|x64
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Release|x64.Build.0 = Release|x64
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Release|x86.ActiveCfg = Release|x86
+		{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}.Release|x86.Build.0 = Release|x86
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Debug|x64.ActiveCfg = Debug|x64
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Debug|x64.Build.0 = Debug|x64
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Debug|x86.ActiveCfg = Debug|x86
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Debug|x86.Build.0 = Debug|x86
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Release|x64.ActiveCfg = Release|x64
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Release|x64.Build.0 = Release|x64
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Release|x86.ActiveCfg = Release|x86
+		{8CFC7A61-E214-44DC-96B3-4CEA9B8E958E}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealisticInstanceProvider.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealisticInstanceProvider.cs	(revision 14838)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealisticInstanceProvider.cs	(revision 14838)
@@ -0,0 +1,141 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.IO.Compression;
+using System.Linq;
+using System.Reflection;
+using System.Text.RegularExpressions;
+using HeuristicLab.Problems.Instances;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  public class RealisticInstanceProvider : ProblemInstanceProvider<BPPData> {
+    protected virtual string FileName { get { return "3D-Instances"; } }
+
+    protected int binWidth, binHeight, binDepth;
+
+    public override string Name {
+      get { return "Realistic"; }
+    }
+
+    public override string Description {
+      get { return "Problem instances derived from real-world data."; }
+    }
+
+    public override Uri WebLink {
+      get { return null; }
+    }
+
+    public override string ReferencePublication {
+      get { return null; }
+    }
+
+    public RealisticInstanceProvider() : base() { }
+
+    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
+      var instanceArchiveName = GetResourceName(FileName + @"\.zip");
+      if (String.IsNullOrEmpty(instanceArchiveName)) yield break;
+
+      using (var instanceStream = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) {
+        foreach (var entry in instanceStream.Entries.Select(x => x.Name).OrderBy(x => x)) {
+          yield return new ThreeDInstanceDescriptor(Path.GetFileNameWithoutExtension(entry), GetDescription(), entry);
+        }
+      }
+    }
+
+    private string GetResourceName(string fileName) {
+      return Assembly.GetExecutingAssembly().GetManifestResourceNames()
+              .Where(x => Regex.Match(x, @".*\.Instances\." + fileName).Success).SingleOrDefault();
+    }
+
+    private string GetDescription() {
+      return "Embedded instance of plugin version " + Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true).Cast<AssemblyFileVersionAttribute>().First().Version + ".";
+    }
+
+    public override BPPData LoadData(IDataDescriptor dd) {
+      var desc = dd as ThreeDInstanceDescriptor;
+      if (desc == null) throw new NotSupportedException("Cannot load data descriptor " + dd);
+      var instanceArchiveName = GetResourceName(FileName + @"\.zip");
+      using (
+        var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName),
+          ZipArchiveMode.Read)) {
+        var entry = instancesZipFile.GetEntry(desc.InstanceIdentifier);
+
+        using (var stream = entry.Open()) {
+          var parser = new ThreeDInstanceParser();
+          parser.Parse(stream);
+
+          return new BPPData() {
+            Name = desc.Name,
+            Description = desc.Description,
+            BinShape = parser.Bin,
+            Items = parser.Items.ToArray()
+          };
+        }
+      }
+    }
+
+    public override bool CanImportData {
+      get { return true; }
+    }
+
+    public override BPPData ImportData(string path) {
+      using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) {
+        var parser = new ThreeDInstanceParser();
+        parser.Parse(stream);
+
+        return new BPPData() {
+          Name = Path.GetFileNameWithoutExtension(path),
+          Description = "Imported instance from " + path,
+          BinShape = parser.Bin,
+          Items = parser.Items.ToArray()
+        };
+      }
+    }
+
+    public override bool CanExportData {
+      get { return true; }
+    }
+
+    public override void ExportData(BPPData instance, string file) {
+      using (Stream stream = new FileStream(file, FileMode.OpenOrCreate, FileAccess.Write)) {
+        Export(instance, stream);
+      }
+    }
+    public static void Export(BPPData instance, Stream stream) {
+
+      using (var writer = new StreamWriter(stream)) {
+        writer.WriteLine(String.Format("{0,-5} {1,-5} {2,-5}   WBIN,HBIN,DBIN", instance.BinShape.Width, instance.BinShape.Height, instance.BinShape.Depth));
+        for (int i = 0; i < instance.NumItems; i++) {
+          if (i == 0)
+            writer.WriteLine("{0,-5} {1,-5} {2,-5}   W(I),H(I),D(I),I=1,...,N", instance.Items[i].Width, instance.Items[i].Height, instance.Items[i].Depth);
+          else
+            writer.WriteLine("{0,-5} {1,-5} {2,-5}", instance.Items[i].Width, instance.Items[i].Height, instance.Items[i].Depth);
+
+        }
+        writer.Flush();
+      }
+    }
+
+  }
+}
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs	(revision 14838)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs	(revision 14838)
@@ -0,0 +1,39 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#endregion
+
+using HeuristicLab.Problems.Instances;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  class ThreeDInstanceDescriptor : IDataDescriptor {
+    public string Name { get; internal set; }
+    public string Description { get; internal set; }
+
+    internal string InstanceIdentifier { get; set; }
+
+    internal ThreeDInstanceDescriptor(string name, string description, string instanceIdentifier) {
+      this.Name = name;
+      this.Description = description;
+      this.InstanceIdentifier = instanceIdentifier;
+    }
+  }
+}
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs	(revision 14838)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs	(revision 14838)
@@ -0,0 +1,75 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  public class ThreeDInstanceParser {
+    public PackingShape Bin { get; private set; }
+    public List<PackingItem> Items { get; private set; }
+
+    public void Parse(Stream stream) {
+      var reader = new StreamReader(stream);
+      var length = GetNextInteger(reader).Value;
+      var width = GetNextInteger(reader).Value;
+      var height = GetNextInteger(reader).Value;
+      var maxWeight = GetNextInteger(reader).Value;
+      Bin = new PackingShape(width, height, length);
+      Items = new List<PackingItem>();
+      while (true) {
+        try {
+          var id = GetNextInteger(reader).Value;
+          var pieces = GetNextInteger(reader).Value;
+          length = GetNextInteger(reader).Value;
+          width = GetNextInteger(reader).Value;
+          height = GetNextInteger(reader).Value;
+          var weight = GetNextInteger(reader).Value;
+          var stack = GetNextInteger(reader).Value;
+          var rotate = GetNextInteger(reader).Value;
+          var tilt = GetNextInteger(reader).Value;
+          for (var i = 0; i < pieces; i++) {
+            Items.Add(new PackingItem(width, height, length, Bin, weight, 1));
+          }
+        } catch (InvalidOperationException) {
+          break;
+        }
+      }
+    }
+
+    private int? GetNextInteger(StreamReader reader) {
+      var next = reader.Read();
+      var builder = new StringBuilder();
+      while (next >= 0 && !char.IsDigit((char)next)) next = reader.Read();
+      if (next == -1) return null;
+      while (char.IsDigit((char)next)) {
+        builder.Append((char)next);
+        next = reader.Read();
+        if (next == -1) break;
+      }
+      return int.Parse(builder.ToString());
+    }
+  }
+}
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj	(revision 14837)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj	(revision 14838)
@@ -158,7 +158,10 @@
     <Compile Include="3D\Evaluators\BinUtilizationEvaluator.cs" />
     <Compile Include="3D\Evaluators\PackingRatioEvaluator.cs" />
+    <Compile Include="3D\Instances\ThreeDInstanceDescriptor.cs" />
     <Compile Include="3D\Instances\BPPData.cs" />
     <Compile Include="3D\Instances\RandomDataDescriptor.cs" />
+    <Compile Include="3D\Instances\RealisticInstanceProvider.cs" />
     <Compile Include="3D\Instances\RandomInstanceProvider.cs" />
+    <Compile Include="3D\Instances\ThreeDInstanceParser.cs" />
     <Compile Include="3D\IntegerVectorEncoding\BottomLeftIntegerVectorDecoder.cs" />
     <Compile Include="3D\IntegerVectorEncoding\ExtremePointIntegerVectorDecoder.cs" />
@@ -196,4 +199,5 @@
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="3D\Instances\3D-Instances.zip" />
     <None Include="HeuristicLab.snk" />
     <None Include="Properties\AssemblyInfo.cs.frame" />
Index: /branches/BinPackingExtension/PreBuildEvent.cmd
===================================================================
--- /branches/BinPackingExtension/PreBuildEvent.cmd	(revision 14838)
+++ /branches/BinPackingExtension/PreBuildEvent.cmd	(revision 14838)
@@ -0,0 +1,11 @@
+IF EXIST "%ProjectDir%\Properties\AssemblyInfo.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Properties\AssemblyInfo.cs.frame" "%ProjectDir%\Properties\AssemblyInfo.cs"
+IF %ERRORLEVEL% NEQ 0 GOTO Error_Handling
+IF EXIST "%ProjectDir%\Plugin.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Plugin.cs.frame" "%ProjectDir%\Plugin.cs"
+IF %ERRORLEVEL% NEQ 0 GOTO Error_Handling
+GOTO Done
+
+:Error_Handling
+ECHO There was an error while running subwcrev. Please verify that the *.cs.frame files have been correctly converted to *.cs files, otherwise HeuristicLab won't build. 
+exit 0
+
+:Done
