Implementing the Incrementation of the Variables

  1. Reading input arguments for the increment value and the number of iteration
  2. Registering the variables to increment
  3. Registering the targets to have in the report
  4. Implementing the incrementation of the variables
  5. Implementing the reception of the new measures
  6. Implementing the check to finish the iteration loop
  7. Outputting a report file

At the beginning of the iteration (in the StartIteration() method) you modify the value in the _variableValues dictionary.

Then, you need to return this value for the parameter id when the asked with the GetNewValue() method.

/// <summary>
///     Callback called upon starting a new iteration in the optimization loop
/// </summary>
/// <param name="iteration">the iteration that is starting</param>
/// <returns> whether we should continue on this iteration or not</returns>
public bool StartIteration(int iteration)
{
    foreach(var key in _variableValues.Keys)
    {
        _variableValues[key] = _variableValues[key] + _incrementValue;
    }

    return true; // we want to continue looping on this iteration
}

// ....

/// <summary>
///     Called to return the new value to set for this parameter
/// </summary>
public double GetNewValue(string parameterId)
{
    return _variableValues[parameterId];
}