org.eclipse.viatra.dse.evolutionary.initialselectors

## Class RandomInitalSelector

- java.lang.Object
- - org.eclipse.viatra.dse.evolutionary.initialselectors.RandomInitalSelector

- All Implemented Interfaces:
    IStrategy, IInitialPopulationSelector

      public class RandomInitalSelector
      extends java.lang.Object
      implements IInitialPopulationSelector

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomInitalSelector(int minDepth, int maxDepth)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `explore()` This method explores the design space as the implementation specifies.
    `java.util.Set<TrajectoryFitness>` | `getInitialPopulation()`
    `void` | `initStrategy(ThreadContext context)` Initializes the strategy with a specific `ThreadContext`.
    `void` | `interruptStrategy()` The implementation of this interface should be ready to be interrupted.
    `void` | `setPopulationSize(int populationSize)` Sets the populations size in the initialization phase.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RandomInitalSelector

          public RandomInitalSelector(int minDepth,
                                      int maxDepth)

  - ### Method Detail

    - #### setPopulationSize

          public void setPopulationSize(int populationSize)

      Description copied from interface: `IInitialPopulationSelector`
      Sets the populations size in the initialization phase. The engine expects this amount of child from the implementation of this interface via the `IStoreChild` implementation.
      Specified by:
        `setPopulationSize` in interface `IInitialPopulationSelector`
      Parameters:
        `populationSize` - Expected number of children.

    - #### initStrategy

          public void initStrategy(ThreadContext context)

      Description copied from interface: `IStrategy`
      Initializes the strategy with a specific `ThreadContext`.
      Specified by:
        `initStrategy` in interface `IStrategy`
      Parameters:
        `context` - The context.

    - #### explore

          public void explore()

      Description copied from interface: `IStrategy`
      This method explores the design space as the implementation specifies. It will be called only once, hence the exploration loop is run by the implementation. The termination condition is also specified by the implementation and when it returns the exploration thread will be disposed.
      Specified by:
        `explore` in interface `IStrategy`

    - #### interruptStrategy

          public void interruptStrategy()

      Description copied from interface: `IStrategy`
      The implementation of this interface should be ready to be interrupted. If this method is called, the `IStrategy.explore()` method should return ASAP. This method is also called by the `SolutionStore` class if enough solutions are found.
      Specified by:
        `interruptStrategy` in interface `IStrategy`

    - #### getInitialPopulation

          public java.util.Set<TrajectoryFitness> getInitialPopulation()

      Specified by:
        `getInitialPopulation` in interface `IInitialPopulationSelector`