Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5440


Ignore:
Timestamp:
02/05/11 00:01:18 (14 years ago)
Author:
abeham
Message:

#852

  • Fixed wiring of VelocityBoundsModifier again (on second thought a "real" wiring is not really necessary)
  • Added PSO as dependency to the main project
Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab 3.3.sln

    r5426 r5440  
    9292    {00814351-4AB8-4088-9B99-F62787B89E93} = {00814351-4AB8-4088-9B99-F62787B89E93}
    9393    {3EAF1454-086D-44A2-8509-B1BA24DB1865} = {3EAF1454-086D-44A2-8509-B1BA24DB1865}
     94    {2C429157-9C34-4DD3-9D5F-B444B751E39A} = {2C429157-9C34-4DD3-9D5F-B444B751E39A}
    9495    {3BD61258-31DA-4B09-89C0-4F71FEF5F05A} = {3BD61258-31DA-4B09-89C0-4F71FEF5F05A}
    9596    {DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6} = {DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6}
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IDiscreteDoubleMatrixModifier.cs

    r5435 r5440  
    2828  public interface IDiscreteDoubleMatrixModifier : IItem {
    2929    ILookupParameter<DoubleMatrix> ValueParameter { get; }
    30     IValueLookupParameter<DoubleValue> ScaleParameter { get; }
     30    ILookupParameter<DoubleValue> ScaleParameter { get; }
    3131    ConstrainedValueParameter<IDiscreteDoubleValueModifier> ScalingOperatorParameter { get; }
    3232    IValueLookupParameter<DoubleValue> StartValueParameter { get; }
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VelocityBoundsModifier.cs

    r5435 r5440  
    3737      get { return (ILookupParameter<DoubleMatrix>)Parameters["Matrix"]; }
    3838    }
    39     public IValueLookupParameter<DoubleValue> ScaleParameter {
    40       get { return (IValueLookupParameter<DoubleValue>)Parameters["Scale"]; }
     39    public ILookupParameter<DoubleValue> ScaleParameter {
     40      get { return (ILookupParameter<DoubleValue>)Parameters["Scale"]; }
    4141    }
    4242    public ConstrainedValueParameter<IDiscreteDoubleValueModifier> ScalingOperatorParameter {
     
    6464    [StorableConstructor]
    6565    private VelocityBoundsModifier(bool deserializing) : base(deserializing) { }
    66     private VelocityBoundsModifier(VelocityBoundsModifier original, Cloner cloner)
    67       : base(original, cloner) {
    68       ParameterizeModifiers();
    69     }
     66    private VelocityBoundsModifier(VelocityBoundsModifier original, Cloner cloner) : base(original, cloner) { }
    7067    public VelocityBoundsModifier() {
    7168      Parameters.Add(new LookupParameter<DoubleMatrix>("Matrix", "The double matrix to modify."));
    72       Parameters.Add(new ValueLookupParameter<DoubleValue>("Scale", "Scale parameter."));
     69      Parameters.Add(new LookupParameter<DoubleValue>("Scale", "Scale parameter."));
    7370      Parameters.Add(new ConstrainedValueParameter<IDiscreteDoubleValueModifier>("ScalingOperator", "Modifies the value"));
    7471      Parameters.Add(new ValueLookupParameter<DoubleValue>("StartValue", "The start value of 'Value'.", new DoubleValue(1)));
     
    7976
    8077      Initialize();
    81       ParameterizeModifiers();
    8278    }
    8379
     
    8783    #endregion
    8884
    89     [StorableHook(HookType.AfterDeserialization)]
    90     private void AfterDeserialization() {
    91       ParameterizeModifiers();
    92     }
    93 
    9485    private void Initialize() {
    9586      foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>()) {
    9687        ScalingOperatorParameter.ValidValues.Add(op);
    97       }
    98     }
    99 
    100     private void ParameterizeModifiers() {
    101       foreach (IDiscreteDoubleValueModifier op in ScalingOperatorParameter.ValidValues) {
    10288        op.ValueParameter.ActualName = ScaleParameter.Name;
    10389        op.StartValueParameter.ActualName = StartValueParameter.Name;
Note: See TracChangeset for help on using the changeset viewer.