Skip to content

Seeding strategies for PSO #27

Description

@Hussein-Mahfouz

In PSO runs, we can choose a sampling option to seed the problem (see #12). In some cases, I am interested in using solutions that are slight variations of the existing initial solution or best solutions.

A solution is a matrix with dimensions (n_routes x n_intervals) with each cell having an index that corresponds to a headway value

Some options for creating these variations:

Option 1: Gaussian perturbation

  • What you specify: a value for $\sigma$ (standard deviation). The value of $\sigma$ controls the strength of the noise we are adding (if $\sigma$ = 0.5, 68% of values will be between -0.5 and 0.5)
  • Add random gaussian noise to each cell. new_value = old_value + random_gaussian_noise
  • postprocessing includes rounding to integer and clipping to bounds

Option 2: K-point mutation

  • What you specify: The number of cells to change
  • You would randomly select K cells and re-assign their values

Option 3: Probabilistic mutation (similar to K-point mutation)

  • What you specify: Mutation rate, or the probability of a cell changing value
  • If mutation rate = 1%, then each cell has a 10% chance of changing

Notes

Of these options:

  • gaussian perturbation is the only one that controls the magnitude of the change for each cell. this is useful if we don't the headways in our edited samples to be too different to the initial solutions
  • In K-point mutation / probabilistic mutation, you can control how many cells are changing, but not how big that change is

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions