Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14702 for branches


Ignore:
Timestamp:
02/24/17 18:48:57 (8 years ago)
Author:
jschiess
Message:

#1836 SA reheating strategies: Added basic temperature reset strategy

Location:
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.3
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/ConsecutiveRejectionReheatingOperator.cs

    r14555 r14702  
    1616namespace HeuristicLab.Algorithms.SimulatedAnnealing
    1717{
    18     [Item("ConsecutiveRejectionReheatingOperator", "The operator reheats the temperature by x when n consecutive solutions are rejected.")]
     18    [Item("ConsecutiveRejectionReheatingOperator", "The operator reheats the temperature by X when N consecutive solutions are rejected.")]
    1919    [StorableClass]
    2020    public class ConsecutiveRejectionReheatingOperator : SingleSuccessorOperator, IReheatingOperator
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingMainLoop.cs

    r14555 r14702  
    5959        private const string TerminateName = "Terminate";
    6060        private const string AcceptanceMemoryName = "AcceptanceMemory";
     61        private const string ReheatCountName = "ReheatCount";
    6162        #endregion
    6263
     
    217218            variableCreator.Name = "Initialize Memory";
    218219            variableCreator.CollectedValues.Add(new ValueParameter<ItemList<BoolValue>>(AcceptanceMemoryName, new ItemList<BoolValue>()));
     220            variableCreator.CollectedValues.Add(new ValueParameter<IntValue>(ReheatCountName, new IntValue(0)));
    219221
    220222            analyzer1.Name = "Analyzer";
     
    241243            moveMaker.OperatorParameter.ActualName = MoveMakerParameter.Name;
    242244
    243             temperatureController.AnnealingOperatorParameter.ActualName = AnnealingOperatorParameter.Name;
    244             temperatureController.AcceptanceMemoryParameter.ActualName = AcceptanceMemoryName;
    245             temperatureController.CoolingParameter.ActualName = CoolingParameter.Name;
    246             temperatureController.EndTemperatureParameter.ActualName = EndTemperatureParameter.Name;
    247             temperatureController.ReheatingOperatorParameter.ActualName = ReheatingOperatorParameter.Name;
    248             temperatureController.IsAcceptedParameter.ActualName = IsAcceptedName;
    249             temperatureController.IterationsParameter.ActualName = IterationsParameter.Name;
    250             temperatureController.LowerTemperatureParameter.ActualName = LowerTemperatureParameter.Name;
    251             temperatureController.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name;
    252             temperatureController.StartTemperatureParameter.ActualName = StartTemperatureParameter.Name;
    253             temperatureController.TemperatureParameter.ActualName = TemperatureParameter.Name;
    254             temperatureController.TemperatureStartIndexParameter.ActualName = TemperatureStartIndexParameter.Name;
     245           
    255246
    256247            subScopesRemover.RemoveAllSubScopes = true;
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/TemperatureController.cs

    r14555 r14702  
    5050        private const string IsAcceptedName = "IsAccepted";
    5151        private const string AcceptanceMemoryName = "AcceptanceMemory";
     52        private const string ReheatCountName = "ReheatCount";
    5253        #endregion
    5354
     
    101102            get { return (ILookupParameter<ItemList<BoolValue>>)Parameters[AcceptanceMemoryName]; }
    102103        }
     104        public ILookupParameter<IntValue> ReheatCountParameter
     105        {
     106            get { return (ILookupParameter<IntValue>)Parameters[ReheatCountName]; }
     107        }
    103108        #endregion
    104109
     
    121126            Parameters.Add(new LookupParameter<BoolValue>(IsAcceptedName, "Whether the move was accepted or not."));
    122127            Parameters.Add(new LookupParameter<ItemList<BoolValue>>(AcceptanceMemoryName, "Memorizes the last N acceptance decisions."));
     128            Parameters.Add(new LookupParameter<IntValue>(ReheatCountName, "The number of reheats."));
    123129        }
    124130
Note: See TracChangeset for help on using the changeset viewer.