Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2620

Documentation about PinningFilter is incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 8.17.0.Final
    • 8.14.0.Final
    • None
    • None

      Hello, 

      Following section 18.4.1.2 of the 8.14.0.FINAL documentation (https://docs.optaplanner.org/8.14.0.Final/optaplanner-docs/html_single/#configureAPinningFilter ) The description is in contradiction with the source code's java doc of the PinningFilter Interface :

      From doc:
      add a PinningFilter that returns true if an entity is movable, and false if it is pinned. This is more flexible and more verbose than the @PlanningPin approach.

       

      In code: 

      public interface PinningFilter<Solution_, Entity_> {
      
          /**
           * @param solution working solution to which the entity belongs
           * @param entity never null, a {@link PlanningEntity}
           * @return true if the entity it is pinned, false if the entity is movable.
           */
          boolean accept(Solution_ solution, Entity_ entity);
      
      } 

      Nothing major, but worth noting.

              lpetrovi@redhat.com Lukáš Petrovický (Inactive)
              crommvardek Cyril Carlier (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: