mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
rename packages to com.graphhopper.* - #215
This commit is contained in:
parent
2f4e9196d9
commit
8004676211
465 changed files with 3569 additions and 3567 deletions
|
|
@ -16,16 +16,16 @@
|
|||
******************************************************************************/
|
||||
|
||||
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.InitialSolutionFactory;
|
||||
import jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.InitialSolutionFactory;
|
||||
import com.graphhopper.jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -15,24 +15,24 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.acceptor.SchrimpfAcceptance;
|
||||
import jsprit.core.algorithm.acceptor.SolutionAcceptor;
|
||||
import jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import jsprit.core.algorithm.recreate.VehicleSwitched;
|
||||
import jsprit.core.algorithm.state.*;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.constraint.SwitchNotFeasible;
|
||||
import jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import jsprit.core.problem.vehicle.VehicleTypeKey;
|
||||
import jsprit.core.util.ActivityTimeTracker;
|
||||
import com.graphhopper.jsprit.core.algorithm.acceptor.SchrimpfAcceptance;
|
||||
import com.graphhopper.jsprit.core.algorithm.acceptor.SolutionAcceptor;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.VehicleSwitched;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.*;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.SwitchNotFeasible;
|
||||
import com.graphhopper.jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeKey;
|
||||
import com.graphhopper.jsprit.core.util.ActivityTimeTracker;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionEndsListener;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionEndsListener;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.acceptor.SolutionAcceptor;
|
||||
import jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import jsprit.core.algorithm.selector.SolutionSelector;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.algorithm.acceptor.SolutionAcceptor;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.selector.SolutionSelector;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -127,8 +127,8 @@ public class SearchStrategy {
|
|||
/**
|
||||
* Runs the search-strategy and its according modules, and returns DiscoveredSolution.
|
||||
* <p/>
|
||||
* <p>This involves three basic steps: 1) Selecting a solution from solutions (input parameter) according to {@link jsprit.core.algorithm.selector.SolutionSelector}, 2) running the modules
|
||||
* ({@link jsprit.core.algorithm.SearchStrategyModule}) on the selectedSolution and 3) accepting the new solution according to {@link jsprit.core.algorithm.acceptor.SolutionAcceptor}.
|
||||
* <p>This involves three basic steps: 1) Selecting a solution from solutions (input parameter) according to {@link com.graphhopper.jsprit.core.algorithm.selector.SolutionSelector}, 2) running the modules
|
||||
* ({@link SearchStrategyModule}) on the selectedSolution and 3) accepting the new solution according to {@link com.graphhopper.jsprit.core.algorithm.acceptor.SolutionAcceptor}.
|
||||
* <p> Note that after 1) the selected solution is copied, thus the original solution is not modified.
|
||||
* <p> Note also that 3) modifies the input parameter solutions by adding, removing, replacing the existing solutions or whatever is defined in the solutionAcceptor.
|
||||
*
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.listener.SearchStrategyListener;
|
||||
import jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import jsprit.core.util.RandomNumberGeneration;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.SearchStrategyListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
|
||||
public interface SearchStrategyModule {
|
||||
|
|
@ -16,14 +16,14 @@
|
|||
* Contributors:
|
||||
* Stefan Schroeder - initial API and implementation
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.state.InternalStates;
|
||||
import jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.InternalStates;
|
||||
import com.graphhopper.jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
/**
|
||||
* Default objective function which is the sum of all fixed vehicle and variable
|
||||
|
|
@ -14,17 +14,20 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.SearchStrategy.DiscoveredSolution;
|
||||
import jsprit.core.algorithm.listener.*;
|
||||
import jsprit.core.algorithm.termination.PrematureAlgorithmTermination;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.util.Solutions;
|
||||
import com.graphhopper.jsprit.core.algorithm.SearchStrategy.DiscoveredSolution;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.SearchStrategyListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners;
|
||||
import com.graphhopper.jsprit.core.algorithm.termination.PrematureAlgorithmTermination;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -182,10 +185,10 @@ public class VehicleRoutingAlgorithm {
|
|||
* <p/>
|
||||
* <p>The algorithm runs as long as it is specified in nuOfIterations and prematureBreak. In each iteration it selects a searchStrategy according
|
||||
* to searchStrategyManager and runs the strategy to improve solutions.
|
||||
* <p>Note that clients are allowed to observe/listen the algorithm. See {@link VehicleRoutingAlgorithmListener} and its according listeners.
|
||||
* <p>Note that clients are allowed to observe/listen the algorithm. See {@link com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListener} and its according listeners.
|
||||
*
|
||||
* @return Collection<VehicleRoutingProblemSolution> the solutions
|
||||
* @see {@link SearchStrategyManager}, {@link VehicleRoutingAlgorithmListener}, {@link AlgorithmStartsListener}, {@link AlgorithmEndsListener}, {@link IterationStartsListener}, {@link IterationEndsListener}
|
||||
* @see {@link SearchStrategyManager}, {@link com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListener}, {@link com.graphhopper.jsprit.core.algorithm.listener.AlgorithmStartsListener}, {@link com.graphhopper.jsprit.core.algorithm.listener.AlgorithmEndsListener}, {@link com.graphhopper.jsprit.core.algorithm.listener.IterationStartsListener}, {@link com.graphhopper.jsprit.core.algorithm.listener.IterationEndsListener}
|
||||
*/
|
||||
public Collection<VehicleRoutingProblemSolution> searchSolutions() {
|
||||
logger.info("algorithm starts: [maxIterations={}]", maxIterations);
|
||||
|
|
@ -14,16 +14,16 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.algorithm.state.StateManager;
|
||||
import jsprit.core.algorithm.state.UpdateEndLocationIfRouteIsOpen;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.StateManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.UpdateEndLocationIfRouteIsOpen;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
|
||||
/**
|
||||
* Builder that builds a {@link VehicleRoutingAlgorithm}.
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm;
|
||||
package com.graphhopper.jsprit.core.algorithm;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
|
||||
|
||||
public interface VehicleRoutingAlgorithmFactory {
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.acceptor;
|
||||
package com.graphhopper.jsprit.core.algorithm.acceptor;
|
||||
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,19 +14,19 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.acceptor;
|
||||
package com.graphhopper.jsprit.core.algorithm.acceptor;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import jsprit.core.algorithm.listener.IterationEndsListener;
|
||||
import jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.util.Resource;
|
||||
import jsprit.core.util.Solutions;
|
||||
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.IterationEndsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.util.Resource;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import org.apache.commons.math.stat.descriptive.moment.StandardDeviation;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.acceptor;
|
||||
package com.graphhopper.jsprit.core.algorithm.acceptor;
|
||||
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.acceptor;
|
||||
package com.graphhopper.jsprit.core.algorithm.acceptor;
|
||||
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,13 +14,13 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.acceptor;
|
||||
package com.graphhopper.jsprit.core.algorithm.acceptor;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -14,18 +14,18 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.acceptor;
|
||||
package com.graphhopper.jsprit.core.algorithm.acceptor;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import jsprit.core.algorithm.listener.IterationEndsListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.util.Resource;
|
||||
import jsprit.core.util.Solutions;
|
||||
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.IterationEndsListener;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.util.Resource;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import org.apache.commons.math.stat.descriptive.moment.StandardDeviation;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.acceptor;
|
||||
package com.graphhopper.jsprit.core.algorithm.acceptor;
|
||||
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package jsprit.core.algorithm.box;
|
||||
package com.graphhopper.jsprit.core.algorithm.box;
|
||||
|
||||
import jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.SoftActivityConstraint;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.util.RandomNumberGeneration;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.SoftActivityConstraint;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Random;
|
||||
|
|
@ -14,20 +14,20 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.box;
|
||||
package com.graphhopper.jsprit.core.algorithm.box;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.util.Resource;
|
||||
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.util.Resource;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
|
||||
/**
|
||||
* Factory that creates the {@link VehicleRoutingAlgorithm} as proposed by Schrimpf et al., 2000 with the following parameters:
|
||||
* Factory that creates the {@link com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm} as proposed by Schrimpf et al., 2000 with the following parameters:
|
||||
* <p/>
|
||||
* <p/>
|
||||
* R&R_random (prob=0.5, F=0.5);
|
||||
|
|
@ -47,7 +47,7 @@ import java.net.URL;
|
|||
public class GreedySchrimpfFactory {
|
||||
|
||||
/**
|
||||
* Creates the {@link VehicleRoutingAlgorithm}.
|
||||
* Creates the {@link com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm}.
|
||||
*
|
||||
* @param vrp
|
||||
* @return algorithm
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package jsprit.core.algorithm.box;
|
||||
package com.graphhopper.jsprit.core.algorithm.box;
|
||||
|
||||
import jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.SoftActivityConstraint;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.util.RandomNumberGeneration;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.SoftActivityConstraint;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Random;
|
||||
|
|
@ -1,30 +1,30 @@
|
|||
package jsprit.core.algorithm.box;
|
||||
package com.graphhopper.jsprit.core.algorithm.box;
|
||||
|
||||
import jsprit.core.algorithm.PrettyAlgorithmBuilder;
|
||||
import jsprit.core.algorithm.SearchStrategy;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.acceptor.SchrimpfAcceptance;
|
||||
import jsprit.core.algorithm.listener.AlgorithmEndsListener;
|
||||
import jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import jsprit.core.algorithm.module.RuinAndRecreateModule;
|
||||
import jsprit.core.algorithm.recreate.*;
|
||||
import jsprit.core.algorithm.ruin.*;
|
||||
import jsprit.core.algorithm.ruin.distance.AvgServiceAndShipmentDistance;
|
||||
import jsprit.core.algorithm.selector.SelectBest;
|
||||
import jsprit.core.algorithm.state.StateManager;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.BreakActivity;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.FiniteFleetManagerFactory;
|
||||
import jsprit.core.problem.vehicle.InfiniteFleetManagerFactory;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import jsprit.core.util.NoiseMaker;
|
||||
import jsprit.core.util.RandomNumberGeneration;
|
||||
import jsprit.core.util.Solutions;
|
||||
import com.graphhopper.jsprit.core.algorithm.PrettyAlgorithmBuilder;
|
||||
import com.graphhopper.jsprit.core.algorithm.SearchStrategy;
|
||||
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import com.graphhopper.jsprit.core.algorithm.acceptor.SchrimpfAcceptance;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.AlgorithmEndsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.IterationStartsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.module.RuinAndRecreateModule;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.*;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.*;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.distance.AvgServiceAndShipmentDistance;
|
||||
import com.graphhopper.jsprit.core.algorithm.selector.SelectBest;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.StateManager;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.BreakActivity;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.FiniteFleetManagerFactory;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.InfiniteFleetManagerFactory;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.util.NoiseMaker;
|
||||
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Properties;
|
||||
|
|
@ -14,20 +14,20 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.box;
|
||||
package com.graphhopper.jsprit.core.algorithm.box;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.util.Resource;
|
||||
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfig;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.util.Resource;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
|
||||
/**
|
||||
* Factory that creates the {@link VehicleRoutingAlgorithm} as proposed by Schrimpf et al., 2000 with the following parameters:
|
||||
* Factory that creates the {@link com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm} as proposed by Schrimpf et al., 2000 with the following parameters:
|
||||
* <p/>
|
||||
* <p/>
|
||||
* R&R_random (prob=0.5, F=0.5);
|
||||
|
|
@ -47,7 +47,7 @@ import java.net.URL;
|
|||
public class SchrimpfFactory {
|
||||
|
||||
/**
|
||||
* Creates the {@link VehicleRoutingAlgorithm}.
|
||||
* Creates the {@link com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm}.
|
||||
*
|
||||
* @param vrp the underlying vehicle routing problem
|
||||
* @return algorithm
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.io;
|
||||
package com.graphhopper.jsprit.core.algorithm.io;
|
||||
|
||||
import org.apache.commons.configuration.XMLConfiguration;
|
||||
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.io;
|
||||
package com.graphhopper.jsprit.core.algorithm.io;
|
||||
|
||||
import jsprit.core.util.Resource;
|
||||
import com.graphhopper.jsprit.core.util.Resource;
|
||||
import org.apache.commons.configuration.ConfigurationException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
|
@ -14,15 +14,15 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.io;
|
||||
package com.graphhopper.jsprit.core.algorithm.io;
|
||||
|
||||
import jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.PrioritizedVRAListener;
|
||||
import jsprit.core.algorithm.recreate.InsertionBuilder;
|
||||
import jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import jsprit.core.algorithm.state.StateManager;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionBuilder;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.StateManager;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import org.apache.commons.configuration.HierarchicalConfiguration;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
|
@ -37,7 +37,7 @@ class InsertionFactory {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static InsertionStrategy createInsertion(VehicleRoutingProblem vrp, HierarchicalConfiguration config,
|
||||
VehicleFleetManager vehicleFleetManager, StateManager stateManager, List<PrioritizedVRAListener> algorithmListeners, ExecutorService executorService, int nuOfThreads, ConstraintManager constraintManager, boolean addDefaultCostCalculators) {
|
||||
VehicleFleetManager vehicleFleetManager, StateManager stateManager, List<VehicleRoutingAlgorithmListeners.PrioritizedVRAListener> algorithmListeners, ExecutorService executorService, int nuOfThreads, ConstraintManager constraintManager, boolean addDefaultCostCalculators) {
|
||||
|
||||
if (config.containsKey("[@name]")) {
|
||||
String insertionName = config.getString("[@name]");
|
||||
|
|
@ -14,43 +14,43 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.io;
|
||||
package com.graphhopper.jsprit.core.algorithm.io;
|
||||
|
||||
|
||||
import jsprit.core.algorithm.*;
|
||||
import jsprit.core.algorithm.acceptor.*;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms.TypedMap.*;
|
||||
import jsprit.core.algorithm.listener.AlgorithmEndsListener;
|
||||
import jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.PrioritizedVRAListener;
|
||||
import jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.Priority;
|
||||
import jsprit.core.algorithm.module.RuinAndRecreateModule;
|
||||
import jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import jsprit.core.algorithm.ruin.RadialRuinStrategyFactory;
|
||||
import jsprit.core.algorithm.ruin.RandomRuinStrategyFactory;
|
||||
import jsprit.core.algorithm.ruin.RuinStrategy;
|
||||
import jsprit.core.algorithm.ruin.distance.AvgServiceAndShipmentDistance;
|
||||
import jsprit.core.algorithm.ruin.distance.JobDistance;
|
||||
import jsprit.core.algorithm.selector.SelectBest;
|
||||
import jsprit.core.algorithm.selector.SelectRandomly;
|
||||
import jsprit.core.algorithm.selector.SolutionSelector;
|
||||
import jsprit.core.algorithm.state.*;
|
||||
import jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
|
||||
import jsprit.core.algorithm.termination.PrematureAlgorithmTermination;
|
||||
import jsprit.core.algorithm.termination.TimeTermination;
|
||||
import jsprit.core.algorithm.termination.VariationCoefficientTermination;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.VehicleRoutingProblem.FleetSize;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.constraint.SwitchNotFeasible;
|
||||
import jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.ReverseActivityVisitor;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.*;
|
||||
import jsprit.core.util.ActivityTimeTracker;
|
||||
import com.graphhopper.jsprit.core.algorithm.*;
|
||||
import com.graphhopper.jsprit.core.algorithm.acceptor.*;
|
||||
import com.graphhopper.jsprit.core.algorithm.io.VehicleRoutingAlgorithms.TypedMap.*;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.AlgorithmEndsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.PrioritizedVRAListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.Priority;
|
||||
import com.graphhopper.jsprit.core.algorithm.module.RuinAndRecreateModule;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.RadialRuinStrategyFactory;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.RandomRuinStrategyFactory;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.RuinStrategy;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.distance.AvgServiceAndShipmentDistance;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.distance.JobDistance;
|
||||
import com.graphhopper.jsprit.core.algorithm.selector.SelectBest;
|
||||
import com.graphhopper.jsprit.core.algorithm.selector.SelectRandomly;
|
||||
import com.graphhopper.jsprit.core.algorithm.selector.SolutionSelector;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.*;
|
||||
import com.graphhopper.jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
|
||||
import com.graphhopper.jsprit.core.algorithm.termination.PrematureAlgorithmTermination;
|
||||
import com.graphhopper.jsprit.core.algorithm.termination.TimeTermination;
|
||||
import com.graphhopper.jsprit.core.algorithm.termination.VariationCoefficientTermination;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem.FleetSize;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.SwitchNotFeasible;
|
||||
import com.graphhopper.jsprit.core.problem.solution.SolutionCostCalculator;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.ReverseActivityVisitor;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.*;
|
||||
import com.graphhopper.jsprit.core.util.ActivityTimeTracker;
|
||||
import org.apache.commons.configuration.HierarchicalConfiguration;
|
||||
import org.apache.commons.configuration.XMLConfiguration;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
|
@ -353,11 +353,11 @@ public class VehicleRoutingAlgorithms {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link jsprit.core.algorithm.VehicleRoutingAlgorithm} from a AlgorithConfig based on the input vrp.
|
||||
* Creates a {@link com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm} from a AlgorithConfig based on the input vrp.
|
||||
*
|
||||
* @param vrp the routing problem
|
||||
* @param algorithmConfig the algorithm config
|
||||
* @return {@link jsprit.core.algorithm.VehicleRoutingAlgorithm}
|
||||
* @return {@link com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm}
|
||||
*/
|
||||
public static VehicleRoutingAlgorithm createAlgorithm(final VehicleRoutingProblem vrp, final AlgorithmConfig algorithmConfig) {
|
||||
return createAlgo(vrp, algorithmConfig.getXMLConfiguration(), 0, null);
|
||||
|
|
@ -372,7 +372,7 @@ public class VehicleRoutingAlgorithms {
|
|||
*
|
||||
* @param vrp the routing problem
|
||||
* @param configURL config url
|
||||
* @return {@link jsprit.core.algorithm.VehicleRoutingAlgorithm}
|
||||
* @return {@link com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm}
|
||||
*/
|
||||
public static VehicleRoutingAlgorithm readAndCreateAlgorithm(final VehicleRoutingProblem vrp, final URL configURL) {
|
||||
AlgorithmConfig algorithmConfig = new AlgorithmConfig();
|
||||
|
|
@ -389,11 +389,11 @@ public class VehicleRoutingAlgorithms {
|
|||
}
|
||||
|
||||
/**
|
||||
* Read and creates {@link jsprit.core.problem.VehicleRoutingProblem} from config-file.
|
||||
* Read and creates {@link com.graphhopper.jsprit.core.problem.VehicleRoutingProblem} from config-file.
|
||||
*
|
||||
* @param vrp the routing problem
|
||||
* @param configFileName the config filename (and location)
|
||||
* @return {@link jsprit.core.algorithm.VehicleRoutingAlgorithm}
|
||||
* @return {@link com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm}
|
||||
*/
|
||||
public static VehicleRoutingAlgorithm readAndCreateAlgorithm(final VehicleRoutingProblem vrp, final String configFileName) {
|
||||
AlgorithmConfig algorithmConfig = new AlgorithmConfig();
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
public interface SearchStrategyListener extends VehicleRoutingAlgorithmListener {
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
public interface SearchStrategyModuleListener extends VehicleRoutingAlgorithmListener {
|
||||
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
import jsprit.core.algorithm.SearchStrategy;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.algorithm.SearchStrategy;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
public interface VehicleRoutingAlgorithmListener {
|
||||
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.listener;
|
||||
|
||||
import jsprit.core.algorithm.SearchStrategy;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.algorithm.SearchStrategy;
|
||||
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
|
@ -14,16 +14,16 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.module;
|
||||
package com.graphhopper.jsprit.core.algorithm.module;
|
||||
|
||||
import jsprit.core.algorithm.SearchStrategyModule;
|
||||
import jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import jsprit.core.algorithm.ruin.RuinStrategy;
|
||||
import jsprit.core.algorithm.ruin.listener.RuinListener;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.algorithm.SearchStrategyModule;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionStrategy;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.RuinStrategy;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.listener.RuinListener;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
|
@ -15,17 +15,17 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListeners;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.util.RandomNumberGeneration;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListeners;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -15,10 +15,10 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
|
||||
public interface ActivityInsertionCostsCalculator {
|
||||
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
/**
|
||||
* Estimates additional access/egress costs when operating route with a new vehicle that has different start/end-location.
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.cost.VehicleRoutingActivityCosts;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingActivityCosts;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
|
@ -14,13 +14,12 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.InsertionData.NoInsertionFound;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.util.NoiseMaker;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.util.NoiseMaker;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -71,7 +70,7 @@ public final class BestInsertion extends AbstractInsertionStrategy {
|
|||
double bestInsertionCost = Double.MAX_VALUE;
|
||||
for (VehicleRoute vehicleRoute : vehicleRoutes) {
|
||||
InsertionData iData = bestInsertionCostCalculator.getInsertionData(vehicleRoute, unassignedJob, NO_NEW_VEHICLE_YET, NO_NEW_DEPARTURE_TIME_YET, NO_NEW_DRIVER_YET, bestInsertionCost);
|
||||
if (iData instanceof NoInsertionFound) {
|
||||
if (iData instanceof InsertionData.NoInsertionFound) {
|
||||
continue;
|
||||
}
|
||||
if (iData.getInsertionCost() < bestInsertionCost + noiseMaker.makeNoise()) {
|
||||
|
|
@ -81,7 +80,7 @@ public final class BestInsertion extends AbstractInsertionStrategy {
|
|||
}
|
||||
VehicleRoute newRoute = VehicleRoute.emptyRoute();
|
||||
InsertionData newIData = bestInsertionCostCalculator.getInsertionData(newRoute, unassignedJob, NO_NEW_VEHICLE_YET, NO_NEW_DEPARTURE_TIME_YET, NO_NEW_DRIVER_YET, bestInsertionCost);
|
||||
if (!(newIData instanceof NoInsertionFound)) {
|
||||
if (!(newIData instanceof InsertionData.NoInsertionFound)) {
|
||||
if (newIData.getInsertionCost() < bestInsertionCost + noiseMaker.makeNoise()) {
|
||||
bestInsertion = new Insertion(newRoute, newIData);
|
||||
vehicleRoutes.add(newRoute);
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.PrioritizedVRAListener;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import jsprit.core.algorithm.state.StateManager;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.PrioritizedVRAListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.StateManager;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -14,15 +14,15 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.InsertionData.NoInsertionFound;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListeners;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionData.NoInsertionFound;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListeners;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -14,24 +14,24 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.JobActivityFactory;
|
||||
import jsprit.core.problem.Location;
|
||||
import jsprit.core.problem.constraint.*;
|
||||
import jsprit.core.problem.constraint.HardActivityConstraint.ConstraintsStatus;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Break;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.BreakActivity;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.Start;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.util.CalculationUtils;
|
||||
import com.graphhopper.jsprit.core.problem.JobActivityFactory;
|
||||
import com.graphhopper.jsprit.core.problem.Location;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.*;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.HardActivityConstraint.ConstraintsStatus;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Break;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.BreakActivity;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.Start;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.util.CalculationUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Calculator that calculates the best insertion position for a {@link jsprit.core.problem.job.Service}.
|
||||
* Calculator that calculates the best insertion position for a {@link com.graphhopper.jsprit.core.problem.job.Service}.
|
||||
*
|
||||
* @author schroeder
|
||||
*/
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.util.RandomNumberGeneration;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.Location;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.job.Service;
|
||||
import jsprit.core.problem.job.Shipment;
|
||||
import com.graphhopper.jsprit.core.problem.Location;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.job.Service;
|
||||
import com.graphhopper.jsprit.core.problem.job.Shipment;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 15/10/15.
|
||||
|
|
@ -16,15 +16,15 @@
|
|||
* Contributors:
|
||||
* Stefan Schroeder - initial API and implementation
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||
import jsprit.core.problem.constraint.SoftRouteConstraint;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.SoftRouteConstraint;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 19/05/15.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 19/05/15.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 19/05/15.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 19/05/15.
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 19/05/15.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -14,17 +14,17 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.InsertionData.NoInsertionFound;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListeners;
|
||||
import jsprit.core.problem.AbstractActivity;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.job.Service;
|
||||
import jsprit.core.problem.job.Shipment;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.*;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionData.NoInsertionFound;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListeners;
|
||||
import com.graphhopper.jsprit.core.problem.AbstractActivity;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.job.Service;
|
||||
import com.graphhopper.jsprit.core.problem.job.Shipment;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.PrioritizedVRAListener;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import jsprit.core.algorithm.state.StateManager;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.StateManager;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -147,7 +147,7 @@ public class InsertionBuilder {
|
|||
|
||||
public InsertionStrategy build() {
|
||||
List<InsertionListener> iListeners = new ArrayList<InsertionListener>();
|
||||
List<PrioritizedVRAListener> algorithmListeners = new ArrayList<PrioritizedVRAListener>();
|
||||
List<VehicleRoutingAlgorithmListeners.PrioritizedVRAListener> algorithmListeners = new ArrayList<VehicleRoutingAlgorithmListeners.PrioritizedVRAListener>();
|
||||
JobInsertionCostsCalculatorBuilder calcBuilder = new JobInsertionCostsCalculatorBuilder(iListeners, algorithmListeners);
|
||||
if (local) {
|
||||
calcBuilder.setLocalLevel(addDefaultCostCalc);
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import jsprit.core.problem.vehicle.VehicleImpl;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
|
||||
public interface InsertionStrategyFactory {
|
||||
|
||||
|
|
@ -16,12 +16,12 @@
|
|||
* Contributors:
|
||||
* Stefan Schroeder - initial API and implementation
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
|
@ -14,19 +14,18 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.InsertionData.NoInsertionFound;
|
||||
import jsprit.core.algorithm.state.InternalStates;
|
||||
import jsprit.core.problem.Capacity;
|
||||
import jsprit.core.problem.constraint.SoftRouteConstraint;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.problem.vehicle.VehicleImpl.NoVehicle;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.InternalStates;
|
||||
import com.graphhopper.jsprit.core.problem.Capacity;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.SoftRouteConstraint;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -56,7 +55,7 @@ final class JobInsertionConsideringFixCostsCalculator implements JobInsertionCos
|
|||
return InsertionData.createEmptyInsertionData();
|
||||
}
|
||||
InsertionData iData = standardServiceInsertion.getInsertionData(currentRoute, jobToInsert, newVehicle, newVehicleDepartureTime, newDriver, bestKnownPrice);
|
||||
if (iData instanceof NoInsertionFound) {
|
||||
if (iData instanceof InsertionData.NoInsertionFound) {
|
||||
return iData;
|
||||
}
|
||||
double totalInsertionCost = iData.getInsertionCost() + fixcost_contribution;
|
||||
|
|
@ -93,7 +92,7 @@ final class JobInsertionConsideringFixCostsCalculator implements JobInsertionCos
|
|||
Capacity load = Capacity.addup(currentMaxLoadInRoute, job.getSize());
|
||||
double currentFix = 0.0;
|
||||
if (route.getVehicle() != null) {
|
||||
if (!(route.getVehicle() instanceof NoVehicle)) {
|
||||
if (!(route.getVehicle() instanceof VehicleImpl.NoVehicle)) {
|
||||
currentFix += route.getVehicle().getType().getVehicleCostParams().fix;
|
||||
}
|
||||
}
|
||||
|
|
@ -107,7 +106,7 @@ final class JobInsertionConsideringFixCostsCalculator implements JobInsertionCos
|
|||
Capacity load = Capacity.addup(currentLoad, job.getSize());
|
||||
double currentRelFix = 0.0;
|
||||
if (route.getVehicle() != null) {
|
||||
if (!(route.getVehicle() instanceof NoVehicle)) {
|
||||
if (!(route.getVehicle() instanceof VehicleImpl.NoVehicle)) {
|
||||
currentRelFix += route.getVehicle().getType().getVehicleCostParams().fix * Capacity.divide(currentLoad, route.getVehicle().getType().getCapacityDimensions());
|
||||
}
|
||||
}
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
|
||||
public interface JobInsertionCostsCalculator {
|
||||
|
|
@ -14,19 +14,19 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.PrioritizedVRAListener;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import jsprit.core.problem.AbstractActivity;
|
||||
import jsprit.core.problem.JobActivityFactory;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.job.*;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.PrioritizedVRAListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import com.graphhopper.jsprit.core.problem.AbstractActivity;
|
||||
import com.graphhopper.jsprit.core.problem.JobActivityFactory;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.job.*;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
|
||||
public interface JobInsertionCostsCalculatorLight {
|
||||
|
|
@ -15,16 +15,16 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners;
|
||||
import jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import jsprit.core.algorithm.state.StateManager;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.InsertionListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.StateManager;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.ConstraintManager;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -15,17 +15,17 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.state.InternalStates;
|
||||
import jsprit.core.problem.cost.VehicleRoutingActivityCosts;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.util.CalculationUtils;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.InternalStates;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingActivityCosts;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.util.CalculationUtils;
|
||||
|
||||
/**
|
||||
* Calculates activity insertion costs locally, i.e. by comparing the additional costs of insertion the new activity k between
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Contributors:
|
||||
* Stefan Schroeder - initial API and implementation
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
public class NoSolutionFoundException extends IllegalStateException {
|
||||
|
||||
|
|
@ -15,12 +15,12 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Break;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Break;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -15,12 +15,12 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Break;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Break;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -15,13 +15,13 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Break;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Break;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -15,13 +15,13 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Break;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Break;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -15,17 +15,17 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.state.InternalStates;
|
||||
import jsprit.core.problem.cost.VehicleRoutingActivityCosts;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.Start;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.InternalStates;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingActivityCosts;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.Start;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 15/10/15.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 15/10/15.
|
||||
|
|
@ -14,31 +14,31 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.JobActivityFactory;
|
||||
import jsprit.core.problem.constraint.*;
|
||||
import jsprit.core.problem.constraint.HardActivityConstraint.ConstraintsStatus;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.job.Service;
|
||||
import jsprit.core.problem.misc.ActivityContext;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.Start;
|
||||
import jsprit.core.problem.solution.route.activity.TimeWindow;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.util.CalculationUtils;
|
||||
import com.graphhopper.jsprit.core.problem.JobActivityFactory;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.*;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.HardActivityConstraint.ConstraintsStatus;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.job.Service;
|
||||
import com.graphhopper.jsprit.core.problem.misc.ActivityContext;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.Start;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TimeWindow;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.util.CalculationUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* Calculator that calculates the best insertion position for a {@link Service}.
|
||||
* Calculator that calculates the best insertion position for a {@link com.graphhopper.jsprit.core.problem.job.Service}.
|
||||
*
|
||||
* @author schroeder
|
||||
*/
|
||||
|
|
@ -14,28 +14,28 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.state.InternalStates;
|
||||
import jsprit.core.problem.JobActivityFactory;
|
||||
import jsprit.core.problem.Location;
|
||||
import jsprit.core.problem.constraint.HardActivityConstraint;
|
||||
import jsprit.core.problem.constraint.HardActivityConstraint.ConstraintsStatus;
|
||||
import jsprit.core.problem.constraint.HardRouteConstraint;
|
||||
import jsprit.core.problem.cost.VehicleRoutingActivityCosts;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.job.Service;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.Start;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivities;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.problem.vehicle.VehicleImpl.NoVehicle;
|
||||
import com.graphhopper.jsprit.core.algorithm.state.InternalStates;
|
||||
import com.graphhopper.jsprit.core.problem.JobActivityFactory;
|
||||
import com.graphhopper.jsprit.core.problem.Location;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.HardActivityConstraint;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.HardActivityConstraint.ConstraintsStatus;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.HardRouteConstraint;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingActivityCosts;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.job.Service;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.Start;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivities;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ final class ServiceInsertionOnRouteLevelCalculator implements JobInsertionCostsC
|
|||
public InsertionData getInsertionData(final VehicleRoute currentRoute, final Job jobToInsert, final Vehicle newVehicle, double newVehicleDepartureTime, final Driver newDriver, final double best_known_insertion_costs) {
|
||||
if (jobToInsert == null)
|
||||
throw new IllegalStateException("job is null. cannot calculate the insertion of a null-job.");
|
||||
if (newVehicle == null || newVehicle instanceof NoVehicle)
|
||||
if (newVehicle == null || newVehicle instanceof VehicleImpl.NoVehicle)
|
||||
throw new IllegalStateException("no vehicle given. set para vehicle!");
|
||||
|
||||
JobInsertionContext insertionContext = new JobInsertionContext(currentRoute, jobToInsert, newVehicle, newDriver, newVehicleDepartureTime);
|
||||
|
|
@ -14,24 +14,24 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.JobActivityFactory;
|
||||
import jsprit.core.problem.constraint.*;
|
||||
import jsprit.core.problem.constraint.HardActivityConstraint.ConstraintsStatus;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.job.Shipment;
|
||||
import jsprit.core.problem.misc.ActivityContext;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.Start;
|
||||
import jsprit.core.problem.solution.route.activity.TimeWindow;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.util.CalculationUtils;
|
||||
import com.graphhopper.jsprit.core.problem.JobActivityFactory;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.*;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.HardActivityConstraint.ConstraintsStatus;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.job.Shipment;
|
||||
import com.graphhopper.jsprit.core.problem.misc.ActivityContext;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.Start;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TimeWindow;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.util.CalculationUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 19/05/15.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.job.Break;
|
||||
import com.graphhopper.jsprit.core.problem.job.Break;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.constraint.SoftActivityConstraint;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.misc.JobInsertionContext;
|
||||
import jsprit.core.problem.solution.route.activity.End;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.util.CalculationUtils;
|
||||
import com.graphhopper.jsprit.core.problem.constraint.SoftActivityConstraint;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.misc.JobInsertionContext;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.End;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.util.CalculationUtils;
|
||||
|
||||
public class VariableTransportCostCalculator implements SoftActivityConstraint {
|
||||
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.listener.VehicleSwitchedListener;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.listener.VehicleSwitchedListener;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
|
||||
|
||||
public class VehicleSwitched implements VehicleSwitchedListener {
|
||||
|
|
@ -14,16 +14,15 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.algorithm.recreate.InsertionData.NoInsertionFound;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import jsprit.core.problem.vehicle.VehicleImpl.NoVehicle;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.driver.Driver;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -101,7 +100,7 @@ final class VehicleTypeDependentJobInsertionCalculator implements JobInsertionCo
|
|||
InsertionData bestIData = InsertionData.createEmptyInsertionData();
|
||||
double bestKnownCost_ = bestKnownCost;
|
||||
Collection<Vehicle> relevantVehicles = new ArrayList<Vehicle>();
|
||||
if (!(selectedVehicle instanceof NoVehicle)) {
|
||||
if (!(selectedVehicle instanceof VehicleImpl.NoVehicle)) {
|
||||
relevantVehicles.add(selectedVehicle);
|
||||
if (vehicleSwitchAllowed && !isVehicleWithInitialRoute(selectedVehicle)) {
|
||||
relevantVehicles.addAll(fleetManager.getAvailableVehicles(selectedVehicle));
|
||||
|
|
@ -114,7 +113,7 @@ final class VehicleTypeDependentJobInsertionCalculator implements JobInsertionCo
|
|||
if (v == selectedVehicle) depTime = currentRoute.getDepartureTime();
|
||||
else depTime = v.getEarliestDeparture();
|
||||
InsertionData iData = insertionCalculator.getInsertionData(currentRoute, jobToInsert, v, depTime, selectedDriver, bestKnownCost_);
|
||||
if (iData instanceof NoInsertionFound) {
|
||||
if (iData instanceof InsertionData.NoInsertionFound) {
|
||||
continue;
|
||||
}
|
||||
if (iData.getInsertionCost() < bestKnownCost_) {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate;
|
||||
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 15/10/15.
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate.listener;
|
||||
|
||||
import jsprit.core.algorithm.recreate.InsertionData;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionData;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
public interface BeforeJobInsertionListener extends InsertionListener {
|
||||
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate.listener;
|
||||
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate.listener;
|
||||
|
||||
import jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.listener.SearchStrategyModuleListener;
|
||||
|
||||
|
||||
public interface InsertionListener extends SearchStrategyModuleListener {
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate.listener;
|
||||
|
||||
import jsprit.core.algorithm.recreate.InsertionData;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.algorithm.recreate.InsertionData;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate.listener;
|
||||
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate.listener;
|
||||
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
|
||||
|
||||
public interface JobInsertedListener extends InsertionListener {
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate.listener;
|
||||
package com.graphhopper.jsprit.core.algorithm.recreate.listener;
|
||||
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
|
||||
public interface VehicleSwitchedListener extends InsertionListener {
|
||||
|
||||
|
|
@ -15,15 +15,15 @@
|
|||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
package jsprit.core.algorithm.ruin;
|
||||
package com.graphhopper.jsprit.core.algorithm.ruin;
|
||||
|
||||
|
||||
import jsprit.core.algorithm.ruin.listener.RuinListener;
|
||||
import jsprit.core.algorithm.ruin.listener.RuinListeners;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.util.RandomNumberGeneration;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.listener.RuinListener;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.listener.RuinListeners;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package jsprit.core.algorithm.ruin;
|
||||
package com.graphhopper.jsprit.core.algorithm.ruin;
|
||||
|
||||
import jsprit.core.problem.Location;
|
||||
import jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.util.RandomNumberGeneration;
|
||||
import jsprit.core.util.RandomUtils;
|
||||
import com.graphhopper.jsprit.core.problem.Location;
|
||||
import com.graphhopper.jsprit.core.problem.cost.VehicleRoutingTransportCosts;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
|
||||
import com.graphhopper.jsprit.core.util.RandomUtils;
|
||||
import org.apache.commons.math3.ml.clustering.Cluster;
|
||||
import org.apache.commons.math3.ml.clustering.Clusterable;
|
||||
import org.apache.commons.math3.ml.distance.DistanceMeasure;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package jsprit.core.algorithm.ruin;
|
||||
package com.graphhopper.jsprit.core.algorithm.ruin;
|
||||
|
||||
import jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package jsprit.core.algorithm.ruin;
|
||||
package com.graphhopper.jsprit.core.algorithm.ruin;
|
||||
|
||||
import jsprit.core.algorithm.ruin.distance.JobDistance;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.distance.JobDistance;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
|
||||
/**
|
||||
* Created by schroeder on 05/03/15.
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package jsprit.core.algorithm.ruin;
|
||||
package com.graphhopper.jsprit.core.algorithm.ruin;
|
||||
|
||||
import jsprit.core.algorithm.ruin.distance.JobDistance;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.util.StopWatch;
|
||||
import com.graphhopper.jsprit.core.algorithm.ruin.distance.JobDistance;
|
||||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.job.Job;
|
||||
import com.graphhopper.jsprit.core.util.StopWatch;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue