Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/06/12 01:43:06 (12 years ago)
Author:
abeham
Message:

#1782: trunk integration of problem instance development

  • Adapted TSP and QAP to use the new feature
  • Moved the TSPLIB importer dialog from the TSP plugin to the TSPLIB instances plugin (created a view for that provider)
  • Created it as a default view for IHeuristicOptimizationProblem in order not to interfere with other problems do not yet work with this
Location:
trunk/sources/HeuristicLab.Problems.Instances.TSPLIB
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBTSPInstanceProvider.cs

    r7548 r7558  
    8888    }
    8989
     90    public TSPData LoadData(string tspFile, string tourFile, double? bestQuality) {
     91      var data = Load(new TSPLIBParser(tspFile));
     92      if (bestQuality.HasValue)
     93        data.BestKnownQuality = bestQuality.Value;
     94      else data.BestKnownQuality = null;
     95      if (!String.IsNullOrEmpty(tourFile)) {
     96        var tourParser = new TSPLIBParser(tourFile);
     97        tourParser.Parse();
     98        data.BestKnownTour = tourParser.Tour[0];
     99      }
     100      return data;
     101    }
     102
    90103    public override void SaveData(TSPData instance, string path) {
    91104      throw new NotSupportedException();
Note: See TracChangeset for help on using the changeset viewer.