Interface InsertionOperatorFactory


public interface InsertionOperatorFactory
Factory interface for creating insertion strategies.

This allows registering insertion operators with the algorithm builder without needing to pre-create all dependencies. The factory will be called during algorithm construction when all dependencies are available.

Example usage:

 Jsprit.Builder.newInstance(vrp)
     .addInsertionOperator(0.7, Insertion.regretFast())
     .addInsertionOperator(0.3, Insertion.regret())
     .buildAlgorithm();
 
See Also:
  • Method Details

    • create

      Creates an insertion strategy with the given dependencies.
      Parameters:
      context - the context containing all required dependencies
      Returns:
      the configured insertion strategy
    • getName

      default String getName()
      Returns the default name for this operator factory.

      This name is used in strategy IDs when no explicit name is provided to addInsertionOperator().

      Returns:
      the default name, or null if not specified
    • named

      Creates a named factory wrapper.
      Parameters:
      name - the operator name
      factory - the factory to wrap
      Returns:
      a factory that returns the given name from getName()