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.QAPLIB
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3

    • Property svn:ignore
      •  

        old new  
        22obj
        33Plugin.cs
         4bin
  • trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs

    r7548 r7558  
    2929namespace HeuristicLab.Problems.Instances.QAPLIB {
    3030  public class QAPLIBInstanceProvider : ProblemInstanceProvider<QAPData> {
     31    #region Reversed instances
     32    // These instances specified their best known solution in the wrong order
     33    private static HashSet<string> reversedSolutions = new HashSet<string>(new string[] {
     34      "bur26a",
     35      "bur26b",
     36      "bur26c",
     37      "bur26d",
     38      "bur26e",
     39      "bur26f",
     40      "bur26g",
     41      "bur26h",
     42      "chr12a",
     43      "chr12b",
     44      "chr12c",
     45      "chr15a",
     46      "chr15b",
     47      "chr15c",
     48      "chr18a",
     49      "chr18b",
     50      "chr20a",
     51      "chr20b",
     52      "chr20c",
     53      "chr22a",
     54      "chr22b",
     55      "chr25a",
     56      "esc16a",
     57      "esc16b",
     58      "esc16c",
     59      "esc16d",
     60      "esc16e",
     61      "esc16g",
     62      "esc16h",
     63      "esc16i",
     64      "esc16j",
     65      "esc32a",
     66      "esc32e",
     67      "esc32f",
     68      "esc32g",
     69      "had12",
     70      "had14",
     71      "had16",
     72      "had18",
     73      "had20",
     74      "kra32",
     75      "lipa20a",
     76      "lipa30a",
     77      "lipa40a",
     78      "lipa50a",
     79      "lipa60a",
     80      "lipa70a",
     81      "lipa80a",
     82      "lipa90a",
     83      "nug12",
     84      "nug14",
     85      "nug15",
     86      "nug16a",
     87      "nug16b",
     88      "nug17",
     89      "nug18",
     90      "nug20",
     91      "nug21",
     92      "nug22",
     93      "nug24",
     94      "nug25",
     95      "nug27",
     96      "nug28",
     97      "rou12",
     98      "rou15",
     99      "rou20",
     100      "scr12",
     101      "scr15",
     102      "scr20",
     103      "sko100a",
     104      "sko100b",
     105      "sko100c",
     106      "sko100d",
     107      "sko100e",
     108      "sko100f",
     109      "sko49",
     110      "sko81",
     111      "sko90",
     112      "ste36a",
     113      "ste36b",
     114      "tai100a",
     115      "tai100b",
     116      "tai12a",
     117      "tai12b",
     118      "tai150b",
     119      "tai15a",
     120      "tai15b",
     121      "tai17a",
     122      "tai20a",
     123      "tai20b",
     124      "tai256c",
     125      "tai25a",
     126      "tai25b",
     127      "tai30b",
     128      "tai35b",
     129      "tai40b",
     130      "tai50a",
     131      "tai50b",
     132      "tai60a",
     133      "tai60b",
     134      "tai64c",
     135      "tai80a",
     136      "tai80b",
     137      "wil100"
     138    });
     139    #endregion
     140
    31141    public override string Name {
    32142      get { return "QAPLIB"; }
     
    79189            if (slnParser.Error != null) throw slnParser.Error;
    80190
    81             instance.BestKnownAssignment = slnParser.Assignment;
     191            int[] assignment = slnParser.Assignment;
     192            if (reversedSolutions.Contains(instance.Name)) {
     193              assignment = (int[])slnParser.Assignment.Clone();
     194              for (int i = 0; i < assignment.Length; i++)
     195                assignment[slnParser.Assignment[i]] = i;
     196            }
     197            instance.BestKnownAssignment = assignment;
    82198            instance.BestKnownQuality = slnParser.Quality;
    83199          }
Note: See TracChangeset for help on using the changeset viewer.