// Path: src/main/java/com/github/rinde/logistics/pdptw/solver/optaplanner/ParcelVisit.java
// static final String PREV_VISIT = "previousVisit";


import static com.github.rinde.logistics.pdptw.solver.optaplanner.ParcelVisit.PREV_VISIT;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
import org.optaplanner.core.impl.heuristic.move.AbstractMove;
import org.optaplanner.core.impl.score.director.ScoreDirector;
import com.github.rinde.rinsim.geom.Point;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
      apply(getOriginalState(), scoreDirector);
    }

    ImmutableList<Visit> getTargetEntities() {
      return getTargetState().subList(1, getTargetState().size());
    }

    ImmutableList<Visit> getOriginalEntities() {
      return getOriginalState().subList(1, getOriginalState().size());
    }

    ImmutableList<Visit> getTargetValues() {
      return getTargetState().subList(0, getTargetState().size() - 1);
    }

    ImmutableList<Visit> getOriginalValues() {
      return getOriginalState().subList(0, getOriginalState().size() - 1);
    }

    static void apply(List<Visit> state, ScoreDirector scoreDirector) {
      for (int i = state.size() - 1; i > 0; i--) {
        final ParcelVisit subject = (ParcelVisit) state.get(i);
        scoreDirector.beforeVariableChanged(subject, PREV_VISIT);

        final Visit target = state.get(i - 1);
        if (target == NullVisit.INSTANCE) {
          subject.setPreviousVisit(null);
        } else {
          subject.setPreviousVisit(target);
        }
// Path: src/main/java/com/github/rinde/logistics/pdptw/solver/optaplanner/ParcelVisit.java
// static final String PREV_VISIT = "previousVisit";


// Path: src/main/java/com/github/rinde/logistics/pdptw/solver/optaplanner/MovePair.java
import static com.github.rinde.logistics.pdptw.solver.optaplanner.ParcelVisit.PREV_VISIT;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
import org.optaplanner.core.impl.heuristic.move.AbstractMove;
import org.optaplanner.core.impl.score.director.ScoreDirector;
import com.github.rinde.rinsim.geom.Point;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;

      apply(getOriginalState(), scoreDirector);
    }

    ImmutableList<Visit> getTargetEntities() {
      return getTargetState().subList(1, getTargetState().size());
    }

    ImmutableList<Visit> getOriginalEntities() {
      return getOriginalState().subList(1, getOriginalState().size());
    }

    ImmutableList<Visit> getTargetValues() {
      return getTargetState().subList(0, getTargetState().size() - 1);
    }

    ImmutableList<Visit> getOriginalValues() {
      return getOriginalState().subList(0, getOriginalState().size() - 1);
    }

    static void apply(List<Visit> state, ScoreDirector scoreDirector) {
      for (int i = state.size() - 1; i > 0; i--) {
        final ParcelVisit subject = (ParcelVisit) state.get(i);
        scoreDirector.beforeVariableChanged(subject, PREV_VISIT);

        final Visit target = state.get(i - 1);
        if (target == NullVisit.INSTANCE) {
          subject.setPreviousVisit(null);
        } else {
          subject.setPreviousVisit(target);
        }
        scoreDirector.afterVariableChanged(subject, PREV_VISIT);