com.google.ortools.constraintsolver.RoutingModel Maven / Gradle / Ivy
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.google.ortools.constraintsolver;
// Used to wrap RoutingTransitCallback2
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongBinaryOperator.html
import java.util.function.LongBinaryOperator;
// Used to wrap RoutingTransitCallback1
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongUnaryOperator.html
import java.util.function.LongUnaryOperator;
public class RoutingModel {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected RoutingModel(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(RoutingModel obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_RoutingModel(swigCPtr);
}
swigCPtr = 0;
}
}
public static long getKNoPenalty() {
return mainJNI.RoutingModel_kNoPenalty_get();
}
public static int getKNoDisjunction() {
return mainJNI.RoutingModel_kNoDisjunction_get();
}
public static int getKNoDimension() {
return mainJNI.RoutingModel_kNoDimension_get();
}
public RoutingModel(RoutingIndexManager index_manager) {
this(mainJNI.new_RoutingModel__SWIG_0(RoutingIndexManager.getCPtr(index_manager), index_manager), true);
}
public RoutingModel(RoutingIndexManager index_manager, com.google.ortools.constraintsolver.RoutingModelParameters parameters) {
this(mainJNI.new_RoutingModel__SWIG_1(RoutingIndexManager.getCPtr(index_manager), index_manager, parameters.toByteArray()), true);
}
public int registerUnaryTransitCallback(LongUnaryOperator callback) {
return mainJNI.RoutingModel_registerUnaryTransitCallback(swigCPtr, this, callback);
}
public int RegisterPositiveUnaryTransitCallback(LongUnaryOperator callback) {
return mainJNI.RoutingModel_RegisterPositiveUnaryTransitCallback(swigCPtr, this, callback);
}
public int registerTransitCallback(LongBinaryOperator callback) {
return mainJNI.RoutingModel_registerTransitCallback(swigCPtr, this, callback);
}
public int registerPositiveTransitCallback(LongBinaryOperator callback) {
return mainJNI.RoutingModel_registerPositiveTransitCallback(swigCPtr, this, callback);
}
public boolean addDimension(int evaluator_index, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name) {
return mainJNI.RoutingModel_addDimension(swigCPtr, this, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name);
}
public boolean addDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name) {
return mainJNI.RoutingModel_addDimensionWithVehicleTransits(swigCPtr, this, evaluator_indices, slack_max, capacity, fix_start_cumul_to_zero, name);
}
public boolean addDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
return mainJNI.RoutingModel_addDimensionWithVehicleCapacity(swigCPtr, this, evaluator_index, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
}
public boolean addDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
return mainJNI.RoutingModel_addDimensionWithVehicleTransitAndCapacity(swigCPtr, this, evaluator_indices, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
}
public boolean addConstantDimensionWithSlack(long value, long capacity, long slack_max, boolean fix_start_cumul_to_zero, String name) {
return mainJNI.RoutingModel_addConstantDimensionWithSlack(swigCPtr, this, value, capacity, slack_max, fix_start_cumul_to_zero, name);
}
public boolean addConstantDimension(long value, long capacity, boolean fix_start_cumul_to_zero, String name) {
return mainJNI.RoutingModel_addConstantDimension(swigCPtr, this, value, capacity, fix_start_cumul_to_zero, name);
}
public boolean addVectorDimension(long[] values, long capacity, boolean fix_start_cumul_to_zero, String name) {
return mainJNI.RoutingModel_addVectorDimension(swigCPtr, this, values, capacity, fix_start_cumul_to_zero, name);
}
public Constraint MakePathSpansAndTotalSlacks(RoutingDimension dimension, IntVar[] spans, IntVar[] total_slacks) {
long cPtr = mainJNI.RoutingModel_MakePathSpansAndTotalSlacks(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension, spans, total_slacks);
return (cPtr == 0) ? null : new Constraint(cPtr, false);
}
public boolean hasDimension(String dimension_name) {
return mainJNI.RoutingModel_hasDimension(swigCPtr, this, dimension_name);
}
public RoutingDimension getDimensionOrDie(String dimension_name) {
return new RoutingDimension(mainJNI.RoutingModel_getDimensionOrDie(swigCPtr, this, dimension_name), false);
}
public RoutingDimension getMutableDimension(String dimension_name) {
long cPtr = mainJNI.RoutingModel_getMutableDimension(swigCPtr, this, dimension_name);
return (cPtr == 0) ? null : new RoutingDimension(cPtr, false);
}
public void setPrimaryConstrainedDimension(String dimension_name) {
mainJNI.RoutingModel_setPrimaryConstrainedDimension(swigCPtr, this, dimension_name);
}
public String getPrimaryConstrainedDimension() {
return mainJNI.RoutingModel_getPrimaryConstrainedDimension(swigCPtr, this);
}
public int addDisjunction(long[] indices, long penalty, long max_cardinality) {
return mainJNI.RoutingModel_addDisjunction__SWIG_0(swigCPtr, this, indices, penalty, max_cardinality);
}
public int addDisjunction(long[] indices, long penalty) {
return mainJNI.RoutingModel_addDisjunction__SWIG_1(swigCPtr, this, indices, penalty);
}
public int addDisjunction(long[] indices) {
return mainJNI.RoutingModel_addDisjunction__SWIG_2(swigCPtr, this, indices);
}
public int[] getDisjunctionIndices(long index) {
return mainJNI.RoutingModel_getDisjunctionIndices__SWIG_0(swigCPtr, this, index);
}
public long[] getDisjunctionIndices(int index) {
return mainJNI.RoutingModel_getDisjunctionIndices__SWIG_1(swigCPtr, this, index);
}
public long getDisjunctionPenalty(int index) {
return mainJNI.RoutingModel_getDisjunctionPenalty(swigCPtr, this, index);
}
public long getDisjunctionMaxCardinality(int index) {
return mainJNI.RoutingModel_getDisjunctionMaxCardinality(swigCPtr, this, index);
}
public int getNumberOfDisjunctions() {
return mainJNI.RoutingModel_getNumberOfDisjunctions(swigCPtr, this);
}
public void ignoreDisjunctionsAlreadyForcedToZero() {
mainJNI.RoutingModel_ignoreDisjunctionsAlreadyForcedToZero(swigCPtr, this);
}
public void addSoftSameVehicleConstraint(long[] indices, long cost) {
mainJNI.RoutingModel_addSoftSameVehicleConstraint(swigCPtr, this, indices, cost);
}
public void setAllowedVehiclesForIndex(int[] vehicles, long index) {
mainJNI.RoutingModel_setAllowedVehiclesForIndex(swigCPtr, this, vehicles, index);
}
public boolean isVehicleAllowedForIndex(int vehicle, long index) {
return mainJNI.RoutingModel_isVehicleAllowedForIndex(swigCPtr, this, vehicle, index);
}
public void addPickupAndDelivery(long pickup, long delivery) {
mainJNI.RoutingModel_addPickupAndDelivery(swigCPtr, this, pickup, delivery);
}
public void addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction) {
mainJNI.RoutingModel_addPickupAndDeliverySets(swigCPtr, this, pickup_disjunction, delivery_disjunction);
}
public void setPickupAndDeliveryPolicyOfAllVehicles(int policy) {
mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfAllVehicles(swigCPtr, this, policy);
}
public void setPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle) {
mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfVehicle(swigCPtr, this, policy, vehicle);
}
public int getPickupAndDeliveryPolicyOfVehicle(int vehicle) {
return mainJNI.RoutingModel_getPickupAndDeliveryPolicyOfVehicle(swigCPtr, this, vehicle);
}
public int getNumOfSingletonNodes() {
return mainJNI.RoutingModel_getNumOfSingletonNodes(swigCPtr, this);
}
public void setVisitType(long index, int type, int type_policy) {
mainJNI.RoutingModel_setVisitType(swigCPtr, this, index, type, type_policy);
}
public int getVisitType(long index) {
return mainJNI.RoutingModel_getVisitType(swigCPtr, this, index);
}
public int GetVisitTypePolicy(long index) {
return mainJNI.RoutingModel_GetVisitTypePolicy(swigCPtr, this, index);
}
public int getNumberOfVisitTypes() {
return mainJNI.RoutingModel_getNumberOfVisitTypes(swigCPtr, this);
}
public void AddRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
mainJNI.RoutingModel_AddRequiredTypeAlternativesWhenAddingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
}
public void AddRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
mainJNI.RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
}
public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenAddingType(swigCPtr, this, type), false);
}
public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, type), false);
}
public long unperformedPenalty(long var_index) {
return mainJNI.RoutingModel_unperformedPenalty(swigCPtr, this, var_index);
}
public long unperformedPenaltyOrValue(long default_value, long var_index) {
return mainJNI.RoutingModel_unperformedPenaltyOrValue(swigCPtr, this, default_value, var_index);
}
public long getDepot() {
return mainJNI.RoutingModel_getDepot(swigCPtr, this);
}
public void setArcCostEvaluatorOfAllVehicles(int evaluator_index) {
mainJNI.RoutingModel_setArcCostEvaluatorOfAllVehicles(swigCPtr, this, evaluator_index);
}
public void setArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle) {
mainJNI.RoutingModel_setArcCostEvaluatorOfVehicle(swigCPtr, this, evaluator_index, vehicle);
}
public void setFixedCostOfAllVehicles(long cost) {
mainJNI.RoutingModel_setFixedCostOfAllVehicles(swigCPtr, this, cost);
}
public void setFixedCostOfVehicle(long cost, int vehicle) {
mainJNI.RoutingModel_setFixedCostOfVehicle(swigCPtr, this, cost, vehicle);
}
public long getFixedCostOfVehicle(int vehicle) {
return mainJNI.RoutingModel_getFixedCostOfVehicle(swigCPtr, this, vehicle);
}
public void setAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
mainJNI.RoutingModel_setAmortizedCostFactorsOfAllVehicles(swigCPtr, this, linear_cost_factor, quadratic_cost_factor);
}
public void setAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
mainJNI.RoutingModel_setAmortizedCostFactorsOfVehicle(swigCPtr, this, linear_cost_factor, quadratic_cost_factor, vehicle);
}
public long[] getAmortizedLinearCostFactorOfVehicles() {
return mainJNI.RoutingModel_getAmortizedLinearCostFactorOfVehicles(swigCPtr, this);
}
public long[] getAmortizedQuadraticCostFactorOfVehicles() {
return mainJNI.RoutingModel_getAmortizedQuadraticCostFactorOfVehicles(swigCPtr, this);
}
public void ConsiderEmptyRouteCostsForVehicle(boolean consider_costs, int vehicle) {
mainJNI.RoutingModel_ConsiderEmptyRouteCostsForVehicle(swigCPtr, this, consider_costs, vehicle);
}
public boolean AreEmptyRouteCostsConsideredForVehicle(int vehicle) {
return mainJNI.RoutingModel_AreEmptyRouteCostsConsideredForVehicle(swigCPtr, this, vehicle);
}
public void setFirstSolutionEvaluator(LongBinaryOperator evaluator) {
mainJNI.RoutingModel_setFirstSolutionEvaluator(swigCPtr, this, evaluator);
}
public void addLocalSearchOperator(LocalSearchOperator ls_operator) {
mainJNI.RoutingModel_addLocalSearchOperator(swigCPtr, this, LocalSearchOperator.getCPtr(ls_operator), ls_operator);
}
public void addSearchMonitor(SearchMonitor monitor) {
mainJNI.RoutingModel_addSearchMonitor(swigCPtr, this, SearchMonitor.getCPtr(monitor), monitor);
}
public void addAtSolutionCallback(Runnable callback) {
mainJNI.RoutingModel_addAtSolutionCallback(swigCPtr, this, callback);
}
public void addVariableMinimizedByFinalizer(IntVar var) {
mainJNI.RoutingModel_addVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
}
public void addVariableMaximizedByFinalizer(IntVar var) {
mainJNI.RoutingModel_addVariableMaximizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
}
public void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost) {
mainJNI.RoutingModel_AddWeightedVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, cost);
}
public void AddVariableTargetToFinalizer(IntVar var, long target) {
mainJNI.RoutingModel_AddVariableTargetToFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, target);
}
public void closeModel() {
mainJNI.RoutingModel_closeModel(swigCPtr, this);
}
public void closeModelWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
mainJNI.RoutingModel_closeModelWithParameters(swigCPtr, this, search_parameters.toByteArray());
}
public Assignment solve(Assignment assignment) {
long cPtr = mainJNI.RoutingModel_solve__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public Assignment solve() {
long cPtr = mainJNI.RoutingModel_solve__SWIG_1(swigCPtr, this);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
long cPtr = mainJNI.RoutingModel_solveWithParameters(swigCPtr, this, search_parameters.toByteArray());
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
long cPtr = mainJNI.RoutingModel_solveFromAssignmentWithParameters(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray());
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
mainJNI.RoutingModel_setAssignmentFromOtherModelAssignment(swigCPtr, this, Assignment.getCPtr(target_assignment), target_assignment, RoutingModel.getCPtr(source_model), source_model, Assignment.getCPtr(source_assignment), source_assignment);
}
public long computeLowerBound() {
return mainJNI.RoutingModel_computeLowerBound(swigCPtr, this);
}
public int status() {
return mainJNI.RoutingModel_status(swigCPtr, this);
}
public IntVar applyLocks(long[] locks) {
long cPtr = mainJNI.RoutingModel_applyLocks(swigCPtr, this, locks);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public boolean applyLocksToAllVehicles(long[][] locks, boolean close_routes) {
return mainJNI.RoutingModel_applyLocksToAllVehicles(swigCPtr, this, locks, close_routes);
}
public Assignment preAssignment() {
long cPtr = mainJNI.RoutingModel_preAssignment(swigCPtr, this);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public Assignment mutablePreAssignment() {
long cPtr = mainJNI.RoutingModel_mutablePreAssignment(swigCPtr, this);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public boolean writeAssignment(String file_name) {
return mainJNI.RoutingModel_writeAssignment(swigCPtr, this, file_name);
}
public Assignment readAssignment(String file_name) {
long cPtr = mainJNI.RoutingModel_readAssignment(swigCPtr, this, file_name);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public Assignment restoreAssignment(Assignment solution) {
long cPtr = mainJNI.RoutingModel_restoreAssignment(swigCPtr, this, Assignment.getCPtr(solution), solution);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public Assignment readAssignmentFromRoutes(long[][] routes, boolean ignore_inactive_indices) {
long cPtr = mainJNI.RoutingModel_readAssignmentFromRoutes(swigCPtr, this, routes, ignore_inactive_indices);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public boolean routesToAssignment(long[][] routes, boolean ignore_inactive_indices, boolean close_routes, Assignment assignment) {
return mainJNI.RoutingModel_routesToAssignment(swigCPtr, this, routes, ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment), assignment);
}
public void assignmentToRoutes(Assignment assignment, long[][] routes) {
mainJNI.RoutingModel_assignmentToRoutes(swigCPtr, this, Assignment.getCPtr(assignment), assignment, routes);
}
public Assignment compactAssignment(Assignment assignment) {
long cPtr = mainJNI.RoutingModel_compactAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public Assignment compactAndCheckAssignment(Assignment assignment) {
long cPtr = mainJNI.RoutingModel_compactAndCheckAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
return (cPtr == 0) ? null : new Assignment(cPtr, false);
}
public void addToAssignment(IntVar var) {
mainJNI.RoutingModel_addToAssignment(swigCPtr, this, IntVar.getCPtr(var), var);
}
public void addIntervalToAssignment(IntervalVar interval) {
mainJNI.RoutingModel_addIntervalToAssignment(swigCPtr, this, IntervalVar.getCPtr(interval), interval);
}
public void addLocalSearchFilter(LocalSearchFilter filter) {
mainJNI.RoutingModel_addLocalSearchFilter(swigCPtr, this, LocalSearchFilter.getCPtr(filter), filter);
}
public long start(int vehicle) {
return mainJNI.RoutingModel_start(swigCPtr, this, vehicle);
}
public long end(int vehicle) {
return mainJNI.RoutingModel_end(swigCPtr, this, vehicle);
}
public boolean isStart(long index) {
return mainJNI.RoutingModel_isStart(swigCPtr, this, index);
}
public boolean isEnd(long index) {
return mainJNI.RoutingModel_isEnd(swigCPtr, this, index);
}
public int VehicleIndex(int index) {
return mainJNI.RoutingModel_VehicleIndex(swigCPtr, this, index);
}
public long next(Assignment assignment, long index) {
return mainJNI.RoutingModel_next(swigCPtr, this, Assignment.getCPtr(assignment), assignment, index);
}
public boolean isVehicleUsed(Assignment assignment, int vehicle) {
return mainJNI.RoutingModel_isVehicleUsed(swigCPtr, this, Assignment.getCPtr(assignment), assignment, vehicle);
}
public IntVar[] nexts() {
return mainJNI.RoutingModel_nexts(swigCPtr, this);
}
public IntVar[] vehicleVars() {
return mainJNI.RoutingModel_vehicleVars(swigCPtr, this);
}
public IntVar nextVar(long index) {
long cPtr = mainJNI.RoutingModel_nextVar(swigCPtr, this, index);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public IntVar activeVar(long index) {
long cPtr = mainJNI.RoutingModel_activeVar(swigCPtr, this, index);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public IntVar VehicleCostsConsideredVar(int vehicle) {
long cPtr = mainJNI.RoutingModel_VehicleCostsConsideredVar(swigCPtr, this, vehicle);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public IntVar vehicleVar(long index) {
long cPtr = mainJNI.RoutingModel_vehicleVar(swigCPtr, this, index);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public IntVar costVar() {
long cPtr = mainJNI.RoutingModel_costVar(swigCPtr, this);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public long getArcCostForVehicle(long from_index, long to_index, long vehicle) {
return mainJNI.RoutingModel_getArcCostForVehicle(swigCPtr, this, from_index, to_index, vehicle);
}
public boolean costsAreHomogeneousAcrossVehicles() {
return mainJNI.RoutingModel_costsAreHomogeneousAcrossVehicles(swigCPtr, this);
}
public long getHomogeneousCost(long from_index, long to_index) {
return mainJNI.RoutingModel_getHomogeneousCost(swigCPtr, this, from_index, to_index);
}
public long getArcCostForFirstSolution(long from_index, long to_index) {
return mainJNI.RoutingModel_getArcCostForFirstSolution(swigCPtr, this, from_index, to_index);
}
public long getArcCostForClass(long from_index, long to_index, long cost_class_index) {
return mainJNI.RoutingModel_getArcCostForClass(swigCPtr, this, from_index, to_index, cost_class_index);
}
public int getCostClassIndexOfVehicle(long vehicle) {
return mainJNI.RoutingModel_getCostClassIndexOfVehicle(swigCPtr, this, vehicle);
}
public boolean hasVehicleWithCostClassIndex(int cost_class_index) {
return mainJNI.RoutingModel_hasVehicleWithCostClassIndex(swigCPtr, this, cost_class_index);
}
public int getCostClassesCount() {
return mainJNI.RoutingModel_getCostClassesCount(swigCPtr, this);
}
public int getNonZeroCostClassesCount() {
return mainJNI.RoutingModel_getNonZeroCostClassesCount(swigCPtr, this);
}
public int getVehicleClassIndexOfVehicle(long vehicle) {
return mainJNI.RoutingModel_getVehicleClassIndexOfVehicle(swigCPtr, this, vehicle);
}
public int getVehicleClassesCount() {
return mainJNI.RoutingModel_getVehicleClassesCount(swigCPtr, this);
}
public int[] getSameVehicleIndicesOfIndex(int node) {
return mainJNI.RoutingModel_getSameVehicleIndicesOfIndex(swigCPtr, this, node);
}
public boolean arcIsMoreConstrainedThanArc(long from, long to1, long to2) {
return mainJNI.RoutingModel_arcIsMoreConstrainedThanArc(swigCPtr, this, from, to1, to2);
}
public String debugOutputAssignment(Assignment solution_assignment, String dimension_to_print) {
return mainJNI.RoutingModel_debugOutputAssignment(swigCPtr, this, Assignment.getCPtr(solution_assignment), solution_assignment, dimension_to_print);
}
public Solver solver() {
long cPtr = mainJNI.RoutingModel_solver(swigCPtr, this);
return (cPtr == 0) ? null : new Solver(cPtr, false);
}
public boolean checkLimit() {
return mainJNI.RoutingModel_checkLimit(swigCPtr, this);
}
public int nodes() {
return mainJNI.RoutingModel_nodes(swigCPtr, this);
}
public int vehicles() {
return mainJNI.RoutingModel_vehicles(swigCPtr, this);
}
public long size() {
return mainJNI.RoutingModel_size(swigCPtr, this);
}
public long getNumberOfDecisionsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
return mainJNI.RoutingModel_getNumberOfDecisionsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
}
public long getNumberOfRejectsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
return mainJNI.RoutingModel_getNumberOfRejectsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
}
public boolean isMatchingModel() {
return mainJNI.RoutingModel_isMatchingModel(swigCPtr, this);
}
public DecisionBuilder makeGuidedSlackFinalizer(RoutingDimension dimension, LongUnaryOperator initializer) {
long cPtr = mainJNI.RoutingModel_makeGuidedSlackFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension, initializer);
return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
}
public DecisionBuilder makeSelfDependentDimensionFinalizer(RoutingDimension dimension) {
long cPtr = mainJNI.RoutingModel_makeSelfDependentDimensionFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
}
public void addMatrixDimension(long[][] values, long capacity, boolean fix_start_cumul_to_zero, String name) {
mainJNI.RoutingModel_addMatrixDimension(swigCPtr, this, values, capacity, fix_start_cumul_to_zero, name);
}
// Status
public final static int ROUTING_NOT_SOLVED = mainJNI.RoutingModel_ROUTING_NOT_SOLVED_get();
public final static int ROUTING_SUCCESS = mainJNI.RoutingModel_ROUTING_SUCCESS_get();
public final static int ROUTING_FAIL = mainJNI.RoutingModel_ROUTING_FAIL_get();
public final static int ROUTING_FAIL_TIMEOUT = mainJNI.RoutingModel_ROUTING_FAIL_TIMEOUT_get();
public final static int ROUTING_INVALID = mainJNI.RoutingModel_ROUTING_INVALID_get();
// PickupAndDeliveryPolicy
public final static int PICKUP_AND_DELIVERY_NO_ORDER = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_NO_ORDER_get();
public final static int PICKUP_AND_DELIVERY_LIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_LIFO_get();
public final static int PICKUP_AND_DELIVERY_FIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_FIFO_get();
// VisitTypePolicy
public final static int TYPE_ADDED_TO_VEHICLE = mainJNI.RoutingModel_TYPE_ADDED_TO_VEHICLE_get();
public final static int ADDED_TYPE_REMOVED_FROM_VEHICLE = mainJNI.RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE_get();
public final static int TYPE_ON_VEHICLE_UP_TO_VISIT = mainJNI.RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT_get();
public final static int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = mainJNI.RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED_get();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy