org.eclipse.viatra.dse.evolutionary.mutations

## Class ModifyTransitionByPriorityMutation

- java.lang.Object
- - org.eclipse.viatra.dse.evolutionary.mutations.ModifyTransitionByPriorityMutation

- All Implemented Interfaces:
    IMutation

      public class ModifyTransitionByPriorityMutation
      extends java.lang.Object
      implements IMutation

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModifyTransitionByPriorityMutation(java.util.Map<BatchTransformationRule<?,?>,java.lang.Integer> priorities)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IMutation` | `createNew()` Creates a new instance.
    `boolean` | `mutate(TrajectoryFitness parent, ThreadContext context)` Based on the parent solution, it creates one child solution by leaving the DSE in the child solution's state (model and trajectory is reachable via the context).

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

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

- - ### Constructor Detail

    - #### ModifyTransitionByPriorityMutation

          public ModifyTransitionByPriorityMutation(java.util.Map<BatchTransformationRule<?,?>,java.lang.Integer> priorities)

  - ### Method Detail

    - #### mutate

          public boolean mutate(TrajectoryFitness parent,
                                ThreadContext context)

      Description copied from interface: `IMutation`
      Based on the parent solution, it creates one child solution by leaving the DSE in the child solution's state (model and trajectory is reachable via the context). If the child generation was unsuccessful, it backtracks to the initial model: leaving the state with an empty trajectory.
      Specified by:
        `mutate` in interface `IMutation`
      Parameters:
        `parent` - The parent solution (trajectory)
        `context` - Context of the design space exploration
      Returns:
        True if the child generation was successful and the context is in the child's state.

    - #### createNew

          public IMutation createNew()

      Description copied from interface: `IMutation`
      Creates a new instance. Required for multi-threaded execution. Can return the same instance (e.g. this) if the implementation is stateless.
      Specified by:
        `createNew` in interface `IMutation`
      Returns:
        An instance.