Class SidewalkAlignment<T>

java.lang.Object
microsim.alignment.probability.SidewalkAlignment<T>
Type Parameters:
T -
All Implemented Interfaces:
AlignmentUtils<T>

public class SidewalkAlignment<T> extends Object implements AlignmentUtils<T>
set individual probability to 1 if there is a change of the integer part of the cumulated probability, 0 otherwise
  • Constructor Details

    • SidewalkAlignment

      public SidewalkAlignment()
  • Method Details

    • align

      public void align(@NonNull @NonNull Collection<T> agents, @Nullable @Nullable org.apache.commons.collections4.Predicate<T> filter, @NonNull @NonNull AlignmentProbabilityClosure<T> closure, double targetProbability)
      The method calibrates the probabilities through nonlinear transformation in order to confine the probability within the range of 0 and 1.
      Parameters:
      agents - A collection of agents.
      filter - A logical filter to filter out agents that don't match certain criteria, can be null.
      closure - A closure to manipulate probabilities of the agents.
      targetProbability - The target probability value that the method converges to.
      Throws:
      NullPointerException - when agents, or closure, or both are null.