Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/10 12:43:41 (15 years ago)
Author:
gkronber
Message:

Fixed persistence of number of tickets for functions. #748 (FunctionLibraryView is empty)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/sources/HeuristicLab.GP/3.3/BaseClasses/Function.cs

    r2729 r3589  
    251251      XmlAttribute maxSubTreesAttr = document.CreateAttribute("MaxSubTrees");
    252252      maxSubTreesAttr.Value = XmlConvert.ToString(MaxSubTrees);
     253      XmlAttribute ticketsAttr = document.CreateAttribute("Tickets");
     254      ticketsAttr.Value = XmlConvert.ToString(Tickets);
    253255      node.Attributes.Append(minSubTreesAttr);
    254256      node.Attributes.Append(maxSubTreesAttr);
     257      node.Attributes.Append(ticketsAttr);
    255258      if (initializer != null)
    256259        node.AppendChild(PersistenceManager.Persist("Initializer", initializer, document, persistedObjects));
     
    274277      MinSubTrees = XmlConvert.ToInt32(node.Attributes["MinSubTrees"].Value);
    275278      MaxSubTrees = XmlConvert.ToInt32(node.Attributes["MaxSubTrees"].Value);
     279      if (node.Attributes["Tickets"] != null) {
     280        tickets = XmlConvert.ToInt32(node.Attributes["Tickets"].Value);
     281      } else {
     282        tickets = 1;
     283      }
    276284      if (node.SelectSingleNode("Initializer") != null) {
    277285        initializer = (IOperator)PersistenceManager.Restore(node.SelectSingleNode("Initializer"), restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.