DotNet Reference
DotNet Reference
RoutingModel.cs
Go to the documentation of this file.
28 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
47 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
98 public RoutingModel(RoutingIndexManager index_manager) : this(operations_research_constraint_solverPINVOKE.new_RoutingModel__SWIG_0(RoutingIndexManager.getCPtr(index_manager)), true) {
99 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
102 public RoutingModel(RoutingIndexManager index_manager, Google.OrTools.ConstraintSolver.RoutingModelParameters parameters) : this(operations_research_constraint_solverPINVOKE.new_RoutingModel__SWIG_1(RoutingIndexManager.getCPtr(index_manager), parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(parameters)), true) {
103 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
107 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterUnaryTransitCallback(swigCPtr, StoreLongToLong(callback) );
112 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterPositiveUnaryTransitCallback(swigCPtr, StoreLongToLong(callback) );
117 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterTransitCallback(swigCPtr, StoreLongLongToLong(callback) );
122 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterPositiveTransitCallback(swigCPtr, StoreLongLongToLong(callback) );
126 public bool AddDimension(int evaluator_index, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name) {
127 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimension(swigCPtr, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name);
128 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
132 public bool AddDimensionWithVehicleTransits( int[] evaluator_indices, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name) {
133 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimensionWithVehicleTransits(swigCPtr, evaluator_indices.Length, evaluator_indices , slack_max, capacity, fix_start_cumul_to_zero, name);
134 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
138 public bool AddDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name) {
139 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimensionWithVehicleCapacity(swigCPtr, evaluator_index, slack_max, vehicle_capacities.Length, vehicle_capacities , fix_start_cumul_to_zero, name);
140 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
144 public bool AddDimensionWithVehicleTransitAndCapacity( int[] evaluator_indices, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name) {
145 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimensionWithVehicleTransitAndCapacity(swigCPtr, evaluator_indices.Length, evaluator_indices , slack_max, vehicle_capacities.Length, vehicle_capacities , fix_start_cumul_to_zero, name);
146 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
150 public bool AddConstantDimensionWithSlack(long value, long capacity, long slack_max, bool fix_start_cumul_to_zero, string name) {
151 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddConstantDimensionWithSlack(swigCPtr, value, capacity, slack_max, fix_start_cumul_to_zero, name);
152 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
156 public bool AddConstantDimension(long value, long capacity, bool fix_start_cumul_to_zero, string name) {
157 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddConstantDimension(swigCPtr, value, capacity, fix_start_cumul_to_zero, name);
158 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
162 public bool AddVectorDimension( long[] values, long capacity, bool fix_start_cumul_to_zero, string name) {
163 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddVectorDimension(swigCPtr, values.Length, values , capacity, fix_start_cumul_to_zero, name);
164 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
168 public Constraint MakePathSpansAndTotalSlacks(RoutingDimension dimension, IntVarVector spans, IntVarVector total_slacks) {
169 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakePathSpansAndTotalSlacks(swigCPtr, RoutingDimension.getCPtr(dimension), IntVarVector.getCPtr(spans), IntVarVector.getCPtr(total_slacks));
171 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
176 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_HasDimension(swigCPtr, dimension_name);
177 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
182 RoutingDimension ret = new RoutingDimension(operations_research_constraint_solverPINVOKE.RoutingModel_GetDimensionOrDie(swigCPtr, dimension_name), false);
183 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
188 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetMutableDimension(swigCPtr, dimension_name);
189 RoutingDimension ret = (cPtr == global::System.IntPtr.Zero) ? null : new RoutingDimension(cPtr, false);
190 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
195 operations_research_constraint_solverPINVOKE.RoutingModel_SetPrimaryConstrainedDimension(swigCPtr, dimension_name);
196 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
200 string ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetPrimaryConstrainedDimension(swigCPtr);
205 return operations_research_constraint_solverPINVOKE.RoutingModel_AddDisjunction__SWIG_0(swigCPtr, indices.Length, indices , penalty, max_cardinality);
209 return operations_research_constraint_solverPINVOKE.RoutingModel_AddDisjunction__SWIG_1(swigCPtr, indices.Length, indices , penalty);
213 return operations_research_constraint_solverPINVOKE.RoutingModel_AddDisjunction__SWIG_2(swigCPtr, indices.Length, indices );
217 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetDisjunctionIndices__SWIG_0(swigCPtr, index);
229 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetDisjunctionIndices__SWIG_1(swigCPtr, index);
241 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetDisjunctionPenalty(swigCPtr, index);
246 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetDisjunctionMaxCardinality(swigCPtr, index);
251 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfDisjunctions(swigCPtr);
256 operations_research_constraint_solverPINVOKE.RoutingModel_IgnoreDisjunctionsAlreadyForcedToZero(swigCPtr);
260 operations_research_constraint_solverPINVOKE.RoutingModel_AddSoftSameVehicleConstraint(swigCPtr, indices.Length, indices , cost);
264 operations_research_constraint_solverPINVOKE.RoutingModel_SetAllowedVehiclesForIndex(swigCPtr, vehicles.Length, vehicles , index);
268 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_IsVehicleAllowedForIndex(swigCPtr, vehicle, index);
273 operations_research_constraint_solverPINVOKE.RoutingModel_AddPickupAndDelivery(swigCPtr, pickup, delivery);
277 operations_research_constraint_solverPINVOKE.RoutingModel_AddPickupAndDeliverySets(swigCPtr, pickup_disjunction, delivery_disjunction);
281 operations_research_constraint_solverPINVOKE.RoutingModel_SetPickupAndDeliveryPolicyOfAllVehicles(swigCPtr, policy);
285 operations_research_constraint_solverPINVOKE.RoutingModel_SetPickupAndDeliveryPolicyOfVehicle(swigCPtr, policy, vehicle);
289 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetPickupAndDeliveryPolicyOfVehicle(swigCPtr, vehicle);
294 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumOfSingletonNodes(swigCPtr);
299 operations_research_constraint_solverPINVOKE.RoutingModel_SetVisitType(swigCPtr, index, type, type_policy);
303 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetVisitType(swigCPtr, index);
308 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetVisitTypePolicy(swigCPtr, index);
313 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfVisitTypes(swigCPtr);
317 public void AddRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
318 operations_research_constraint_solverPINVOKE.RoutingModel_AddRequiredTypeAlternativesWhenAddingType(swigCPtr, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
319 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
322 public void AddRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
323 operations_research_constraint_solverPINVOKE.RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(swigCPtr, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
324 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
327 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
328 SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t ret = new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(operations_research_constraint_solverPINVOKE.RoutingModel_GetRequiredTypeAlternativesWhenAddingType(swigCPtr, type), false);
332 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
333 SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t ret = new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(operations_research_constraint_solverPINVOKE.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(swigCPtr, type), false);
338 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_UnperformedPenalty(swigCPtr, var_index);
343 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_UnperformedPenaltyOrValue(swigCPtr, default_value, var_index);
353 operations_research_constraint_solverPINVOKE.RoutingModel_SetArcCostEvaluatorOfAllVehicles(swigCPtr, evaluator_index);
357 operations_research_constraint_solverPINVOKE.RoutingModel_SetArcCostEvaluatorOfVehicle(swigCPtr, evaluator_index, vehicle);
361 operations_research_constraint_solverPINVOKE.RoutingModel_SetFixedCostOfAllVehicles(swigCPtr, cost);
365 operations_research_constraint_solverPINVOKE.RoutingModel_SetFixedCostOfVehicle(swigCPtr, cost, vehicle);
369 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetFixedCostOfVehicle(swigCPtr, vehicle);
373 public void SetAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
374 operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfAllVehicles(swigCPtr, linear_cost_factor, quadratic_cost_factor);
377 public void SetAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
378 operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfVehicle(swigCPtr, linear_cost_factor, quadratic_cost_factor, vehicle);
382 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetAmortizedLinearCostFactorOfVehicles(swigCPtr);
394 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetAmortizedQuadraticCostFactorOfVehicles(swigCPtr);
406 operations_research_constraint_solverPINVOKE.RoutingModel_ConsiderEmptyRouteCostsForVehicle(swigCPtr, consider_costs, vehicle);
410 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AreEmptyRouteCostsConsideredForVehicle(swigCPtr, vehicle);
415 operations_research_constraint_solverPINVOKE.RoutingModel_SetFirstSolutionEvaluator(swigCPtr, StoreLongLongToLong(evaluator) );
419 operations_research_constraint_solverPINVOKE.RoutingModel_AddLocalSearchOperator(swigCPtr, LocalSearchOperator.getCPtr(ls_operator));
423 operations_research_constraint_solverPINVOKE.RoutingModel_AddSearchMonitor(swigCPtr, SearchMonitor.getCPtr(monitor));
427 operations_research_constraint_solverPINVOKE.RoutingModel_AddAtSolutionCallback(swigCPtr, StoreVoidToVoid(callback) );
431 operations_research_constraint_solverPINVOKE.RoutingModel_AddVariableMinimizedByFinalizer(swigCPtr, IntVar.getCPtr(var));
435 operations_research_constraint_solverPINVOKE.RoutingModel_AddVariableMaximizedByFinalizer(swigCPtr, IntVar.getCPtr(var));
439 operations_research_constraint_solverPINVOKE.RoutingModel_AddWeightedVariableMinimizedByFinalizer(swigCPtr, IntVar.getCPtr(var), cost);
443 operations_research_constraint_solverPINVOKE.RoutingModel_AddVariableTargetToFinalizer(swigCPtr, IntVar.getCPtr(var), target);
450 public void CloseModelWithParameters(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters) {
451 operations_research_constraint_solverPINVOKE.RoutingModel_CloseModelWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
455 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_Solve__SWIG_0(swigCPtr, Assignment.getCPtr(assignment));
461 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_Solve__SWIG_1(swigCPtr);
466 public Assignment SolveWithParameters(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters) {
467 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
472 public Assignment SolveFromAssignmentWithParameters(Assignment assignment, Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters) {
473 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveFromAssignmentWithParameters(swigCPtr, Assignment.getCPtr(assignment), search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
478 public void SetAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
479 operations_research_constraint_solverPINVOKE.RoutingModel_SetAssignmentFromOtherModelAssignment(swigCPtr, Assignment.getCPtr(target_assignment), RoutingModel.getCPtr(source_model), Assignment.getCPtr(source_assignment));
483 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_ComputeLowerBound(swigCPtr);
493 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ApplyLocks(swigCPtr, locks.Length, locks );
499 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_ApplyLocksToAllVehicles(swigCPtr,
508 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_PreAssignment(swigCPtr);
514 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MutablePreAssignment(swigCPtr);
520 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_WriteAssignment(swigCPtr, file_name);
521 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
526 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ReadAssignment(swigCPtr, file_name);
528 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
533 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_RestoreAssignment(swigCPtr, Assignment.getCPtr(solution));
535 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
540 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ReadAssignmentFromRoutes(swigCPtr,
549 public bool RoutesToAssignment( long[][] routes, bool ignore_inactive_indices, bool close_routes, Assignment assignment) {
550 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_RoutesToAssignment(swigCPtr,
559 operations_research_constraint_solverPINVOKE.RoutingModel_AssignmentToRoutes(swigCPtr, Assignment.getCPtr(assignment),
564 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
568 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CompactAssignment(swigCPtr, Assignment.getCPtr(assignment));
570 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
575 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CompactAndCheckAssignment(swigCPtr, Assignment.getCPtr(assignment));
577 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
582 operations_research_constraint_solverPINVOKE.RoutingModel_AddToAssignment(swigCPtr, IntVar.getCPtr(var));
586 operations_research_constraint_solverPINVOKE.RoutingModel_AddIntervalToAssignment(swigCPtr, IntervalVar.getCPtr(interval));
590 operations_research_constraint_solverPINVOKE.RoutingModel_AddLocalSearchFilter(swigCPtr, LocalSearchFilter.getCPtr(filter));
614 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_VehicleIndex(swigCPtr, index);
619 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_Next(swigCPtr, Assignment.getCPtr(assignment), index);
620 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
625 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_IsVehicleUsed(swigCPtr, Assignment.getCPtr(assignment), vehicle);
626 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
631 IntVarVector ret = new IntVarVector(operations_research_constraint_solverPINVOKE.RoutingModel_Nexts(swigCPtr), false);
636 IntVarVector ret = new IntVarVector(operations_research_constraint_solverPINVOKE.RoutingModel_VehicleVars(swigCPtr), false);
641 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_NextVar(swigCPtr, index);
647 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ActiveVar(swigCPtr, index);
653 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_VehicleCostsConsideredVar(swigCPtr, vehicle);
659 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_VehicleVar(swigCPtr, index);
665 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CostVar(swigCPtr);
671 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForVehicle(swigCPtr, from_index, to_index, vehicle);
676 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_CostsAreHomogeneousAcrossVehicles(swigCPtr);
681 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetHomogeneousCost(swigCPtr, from_index, to_index);
686 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForFirstSolution(swigCPtr, from_index, to_index);
691 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForClass(swigCPtr, from_index, to_index, cost_class_index);
696 return operations_research_constraint_solverPINVOKE.RoutingModel_GetCostClassIndexOfVehicle(swigCPtr, vehicle);
700 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_HasVehicleWithCostClassIndex(swigCPtr, cost_class_index);
705 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetCostClassesCount(swigCPtr);
710 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNonZeroCostClassesCount(swigCPtr);
715 return operations_research_constraint_solverPINVOKE.RoutingModel_GetVehicleClassIndexOfVehicle(swigCPtr, vehicle);
719 int ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetVehicleClassesCount(swigCPtr);
724 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetSameVehicleIndicesOfIndex(swigCPtr, node);
736 bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_ArcIsMoreConstrainedThanArc(swigCPtr, from, to1, to2);
740 public string DebugOutputAssignment(Assignment solution_assignment, string dimension_to_print) {
741 string ret = operations_research_constraint_solverPINVOKE.RoutingModel_DebugOutputAssignment(swigCPtr, Assignment.getCPtr(solution_assignment), dimension_to_print);
742 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
747 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_solver(swigCPtr);
772 public long GetNumberOfDecisionsInFirstSolution(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters) {
773 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfDecisionsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
777 public long GetNumberOfRejectsInFirstSolution(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters) {
778 long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfRejectsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
787 public DecisionBuilder MakeGuidedSlackFinalizer(RoutingDimension dimension, LongToLong initializer) {
788 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakeGuidedSlackFinalizer(swigCPtr, RoutingDimension.getCPtr(dimension), StoreLongToLong(initializer) );
789 DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
794 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakeSelfDependentDimensionFinalizer(swigCPtr, RoutingDimension.getCPtr(dimension));
795 DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
800 public static readonly int ROUTING_NOT_SOLVED = operations_research_constraint_solverPINVOKE.RoutingModel_ROUTING_NOT_SOLVED_get();
801 public static readonly int ROUTING_SUCCESS = operations_research_constraint_solverPINVOKE.RoutingModel_ROUTING_SUCCESS_get();
802 public static readonly int ROUTING_FAIL = operations_research_constraint_solverPINVOKE.RoutingModel_ROUTING_FAIL_get();
803 public static readonly int ROUTING_FAIL_TIMEOUT = operations_research_constraint_solverPINVOKE.RoutingModel_ROUTING_FAIL_TIMEOUT_get();
804 public static readonly int ROUTING_INVALID = operations_research_constraint_solverPINVOKE.RoutingModel_ROUTING_INVALID_get();
807 public static readonly int PICKUP_AND_DELIVERY_NO_ORDER = operations_research_constraint_solverPINVOKE.RoutingModel_PICKUP_AND_DELIVERY_NO_ORDER_get();
808 public static readonly int PICKUP_AND_DELIVERY_LIFO = operations_research_constraint_solverPINVOKE.RoutingModel_PICKUP_AND_DELIVERY_LIFO_get();
809 public static readonly int PICKUP_AND_DELIVERY_FIFO = operations_research_constraint_solverPINVOKE.RoutingModel_PICKUP_AND_DELIVERY_FIFO_get();
812 public static readonly int TYPE_ADDED_TO_VEHICLE = operations_research_constraint_solverPINVOKE.RoutingModel_TYPE_ADDED_TO_VEHICLE_get();
813 public static readonly int ADDED_TYPE_REMOVED_FROM_VEHICLE = operations_research_constraint_solverPINVOKE.RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE_get();
814 public static readonly int TYPE_ON_VEHICLE_UP_TO_VISIT = operations_research_constraint_solverPINVOKE.RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT_get();
815 public static readonly int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = operations_research_constraint_solverPINVOKE.RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED_get();
Assignment MutablePreAssignment()
Definition: RoutingModel.cs:513
Assignment SolveFromAssignmentWithParameters(Assignment assignment, Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
Definition: RoutingModel.cs:472
IntVar VehicleVar(long index)
Definition: RoutingModel.cs:658
Google.OrTools.ConstraintSolver.operations_research_constraint_solverPINVOKE.RoutingModel_CheckLimit
static bool RoutingModel_CheckLimit(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_RoutingModel(global::System.Runtime.InteropServices.HandleRef jarg1)
bool RoutesToAssignment(long[][] routes, bool ignore_inactive_indices, bool close_routes, Assignment assignment)
Definition: RoutingModel.cs:549
void SetFirstSolutionEvaluator(LongLongToLong evaluator)
Definition: RoutingModel.cs:414
static void RoutingModel_SetVisitType(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, int jarg3, int jarg4)
static void RoutingModel_AddLocalSearchFilter(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int RoutingModel_PICKUP_AND_DELIVERY_FIFO_get()
long GetNumberOfDecisionsInFirstSolution(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
Definition: RoutingModel.cs:772
static bool RoutingModel_AddConstantDimensionWithSlack(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4, bool jarg5, string jarg6)
static global::System.IntPtr RoutingModel_GetDimensionOrDie(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
bool AddVectorDimension(long[] values, long capacity, bool fix_start_cumul_to_zero, string name)
Definition: RoutingModel.cs:162
static void RoutingModel_SetPrimaryConstrainedDimension(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
static long RoutingModel_GetDepot(global::System.Runtime.InteropServices.HandleRef jarg1)
static int RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE_get()
delegate long LongToLong(long t)
static readonly int ROUTING_FAIL_TIMEOUT
Definition: RoutingModel.cs:803
static readonly int TYPE_ON_VEHICLE_UP_TO_VISIT
Definition: RoutingModel.cs:814
static int kNoDimension
Definition: RoutingModel.cs:91
static void RoutingModel_SetAmortizedCostFactorsOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, int jarg4)
static global::System.IntPtr RoutingModel_Solve__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
void SetArcCostEvaluatorOfAllVehicles(int evaluator_index)
Definition: RoutingModel.cs:352
static void RoutingModel_AddSearchMonitor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int RoutingModel_VehicleIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
bool HasDimension(string dimension_name)
Definition: RoutingModel.cs:175
static global::System.IntPtr RoutingModel_PreAssignment(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoutingModel_SetAssignmentFromOtherModelAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4)
void AddLocalSearchOperator(LocalSearchOperator ls_operator)
Definition: RoutingModel.cs:418
static long RoutingModel_GetNumberOfDecisionsInFirstSolution(global::System.Runtime.InteropServices.HandleRef jarg1, int search_parameters_size, byte[] jarg2)
static int RoutingModel_Vehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
long End(int vehicle)
Definition: RoutingModel.cs:598
static int RoutingModel_GetNonZeroCostClassesCount(global::System.Runtime.InteropServices.HandleRef jarg1)
int GetVehicleClassIndexOfVehicle(long vehicle)
Definition: RoutingModel.cs:714
static global::System.IntPtr RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void RoutingModel_AddRequiredTypeAlternativesWhenAddingType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static long RoutingModel_GetArcCostForFirstSolution(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static long RoutingModel_GetHomogeneousCost(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static void RoutingModel_SetFirstSolutionEvaluator(global::System.Runtime.InteropServices.HandleRef jarg1, LongLongToLong jarg2)
static void RoutingModel_SetAmortizedCostFactorsOfAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static global::System.IntPtr RoutingModel_CompactAndCheckAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool RoutingModel_AddVectorDimension(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, long jarg3, bool jarg4, string jarg5)
static global::System.IntPtr RoutingModel_MakePathSpansAndTotalSlacks(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4)
static int RoutingModel_Nodes(global::System.Runtime.InteropServices.HandleRef jarg1)
void AddVariableMinimizedByFinalizer(IntVar var)
Definition: RoutingModel.cs:430
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type)
Definition: RoutingModel.cs:327
long GetDisjunctionMaxCardinality(int index)
Definition: RoutingModel.cs:245
long[] GetAmortizedLinearCostFactorOfVehicles()
Definition: RoutingModel.cs:381
int GetCostClassIndexOfVehicle(long vehicle)
Definition: RoutingModel.cs:695
int GetStatus()
Definition: RoutingModel.cs:487
static int RoutingModel_GetVisitTypePolicy(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
void SetPrimaryConstrainedDimension(string dimension_name)
Definition: RoutingModel.cs:194
bool AddConstantDimensionWithSlack(long value, long capacity, long slack_max, bool fix_start_cumul_to_zero, string name)
Definition: RoutingModel.cs:150
static string RoutingModel_GetPrimaryConstrainedDimension(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate void VoidToVoid()
IntVar ActiveVar(long index)
Definition: RoutingModel.cs:646
static global::System.IntPtr RoutingModel_Nexts(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool RoutingModel_HasVehicleWithCostClassIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
Google.OrTools.ConstraintSolver.operations_research_constraint_solverPINVOKE.RoutingModel_ApplyLocks
static global::System.IntPtr RoutingModel_ApplyLocks(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static int RoutingModel_kNoDimension_get()
static bool RoutingModel_CostsAreHomogeneousAcrossVehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoutingModel_AddVariableMinimizedByFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
int GetPickupAndDeliveryPolicyOfVehicle(int vehicle)
Definition: RoutingModel.cs:288
static int RoutingModel_AddDisjunction__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, long jarg3)
static bool Pending
static void RoutingModel_AddWeightedVariableMinimizedByFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3)
static global::System.IntPtr RoutingModel_GetDisjunctionIndices__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long RoutingModel_Next(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3)
Google.OrTools.ConstraintSolver.operations_research_constraint_solverPINVOKE.RoutingModel_CloseModel
static void RoutingModel_CloseModel(global::System.Runtime.InteropServices.HandleRef jarg1)
int Count
Definition: constraint_solver/IntVector.cs:101
Assignment ReadAssignment(string file_name)
Definition: RoutingModel.cs:525
static bool RoutingModel_IsStart(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static string RoutingModel_DebugOutputAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, string jarg3)
static void RoutingModel_AddAtSolutionCallback(global::System.Runtime.InteropServices.HandleRef jarg1, VoidToVoid jarg2)
Google.OrTools.ConstraintSolver.operations_research_constraint_solverPINVOKE.RoutingModel_VehicleVar
static global::System.IntPtr RoutingModel_VehicleVar(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static byte[] ProtoToByteArray(IMessage message)
Definition: ProtoHelper.cs:21
RoutingModel(RoutingIndexManager index_manager, Google.OrTools.ConstraintSolver.RoutingModelParameters parameters)
Definition: RoutingModel.cs:102
static int RoutingModel_ROUTING_SUCCESS_get()
void ConsiderEmptyRouteCostsForVehicle(bool consider_costs, int vehicle)
Definition: RoutingModel.cs:405
static global::System.IntPtr RoutingModel_RestoreAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
Definition: Assignment.cs:11
void SetPickupAndDeliveryPolicyOfAllVehicles(int policy)
Definition: RoutingModel.cs:280
static void RoutingModel_ConsiderEmptyRouteCostsForVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2, int jarg3)
Parameters which have to be set when creating a RoutingModel.
Definition: RoutingParameters.pb.cs:2484
void AddPickupAndDelivery(long pickup, long delivery)
Definition: RoutingModel.cs:272
void SetAllowedVehiclesForIndex(int[] vehicles, long index)
Definition: RoutingModel.cs:263
void CloseModelWithParameters(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
Definition: RoutingModel.cs:450
long GetNumberOfRejectsInFirstSolution(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
Definition: RoutingModel.cs:777
static long RoutingModel_UnperformedPenalty(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static long RoutingModel_Size(global::System.Runtime.InteropServices.HandleRef jarg1)
void AssignmentToRoutes(Assignment assignment, long[][] routes)
Definition: RoutingModel.cs:558
static void RoutingModel_AddVariableTargetToFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3)
bool swigCMemOwn
Definition: RoutingModel.cs:20
int GetVisitTypePolicy(long index)
Definition: RoutingModel.cs:307
static readonly int ADDED_TYPE_REMOVED_FROM_VEHICLE
Definition: RoutingModel.cs:813
void AddVariableTargetToFinalizer(IntVar var, long target)
Definition: RoutingModel.cs:442
void SetFixedCostOfAllVehicles(long cost)
Definition: RoutingModel.cs:360
Assignment CompactAndCheckAssignment(Assignment assignment)
Definition: RoutingModel.cs:574
static void RoutingModel_SetPickupAndDeliveryPolicyOfAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
int GetNumOfSingletonNodes()
Definition: RoutingModel.cs:293
static void RoutingModel_IgnoreDisjunctionsAlreadyForcedToZero(global::System.Runtime.InteropServices.HandleRef jarg1)
IntVarVector Nexts()
Definition: RoutingModel.cs:630
long Start(int vehicle)
Definition: RoutingModel.cs:593
static bool RoutingModel_AddConstantDimension(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, bool jarg4, string jarg5)
static int RoutingModel_GetNumOfSingletonNodes(global::System.Runtime.InteropServices.HandleRef jarg1)
void SetAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle)
Definition: RoutingModel.cs:377
Definition: algorithms/Int64Vector.cs:11
long UnperformedPenaltyOrValue(long default_value, long var_index)
Definition: RoutingModel.cs:342
bool IsMatchingModel()
Definition: RoutingModel.cs:782
IntVar ApplyLocks(long[] locks)
Definition: RoutingModel.cs:492
static bool RoutingModel_AddDimensionWithVehicleCapacity(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3, int length4, long[] jarg4, bool jarg5, string jarg6)
long GetArcCostForClass(long from_index, long to_index, long cost_class_index)
Definition: RoutingModel.cs:690
static void RoutingModel_SetAllowedVehiclesForIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2, long jarg3)
static global::System.IntPtr RoutingModel_solver(global::System.Runtime.InteropServices.HandleRef jarg1)
static readonly int ROUTING_NOT_SOLVED
Definition: RoutingModel.cs:800
long UnperformedPenalty(long var_index)
Definition: RoutingModel.cs:337
static int RoutingModel_PICKUP_AND_DELIVERY_LIFO_get()
static global::System.IntPtr RoutingModel_GetRequiredTypeAlternativesWhenAddingType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr RoutingModel_SolveWithParameters(global::System.Runtime.InteropServices.HandleRef jarg1, int search_parameters_size, byte[] jarg2)
void SetFixedCostOfVehicle(long cost, int vehicle)
Definition: RoutingModel.cs:364
void SetPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle)
Definition: RoutingModel.cs:284
static global::System.IntPtr RoutingModel_SolveFromAssignmentWithParameters(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int search_parameters_size, byte[] jarg3)
int GetNonZeroCostClassesCount()
Definition: RoutingModel.cs:709
static int RoutingModel_PICKUP_AND_DELIVERY_NO_ORDER_get()
static bool RoutingModel_ArcIsMoreConstrainedThanArc(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4)
static bool RoutingModel_WriteAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
bool CheckLimit()
Definition: RoutingModel.cs:752
static global::System.IntPtr RoutingModel_VehicleCostsConsideredVar(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
void SetAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment)
Definition: RoutingModel.cs:478
bool AreEmptyRouteCostsConsideredForVehicle(int vehicle)
Definition: RoutingModel.cs:409
static long RoutingModel_GetDisjunctionPenalty(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static int RoutingModel_ROUTING_NOT_SOLVED_get()
static bool RoutingModel_AddDimensionWithVehicleTransitAndCapacity(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2, long jarg3, int length4, long[] jarg4, bool jarg5, string jarg6)
static int RoutingModel_ROUTING_INVALID_get()
int[] GetSameVehicleIndicesOfIndex(int node)
Definition: RoutingModel.cs:723
void AddSearchMonitor(SearchMonitor monitor)
Definition: RoutingModel.cs:422
DecisionBuilder MakeGuidedSlackFinalizer(RoutingDimension dimension, LongToLong initializer)
Definition: RoutingModel.cs:787
bool AddDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name)
Definition: RoutingModel.cs:132
static int kNoDisjunction
Definition: RoutingModel.cs:84
static void RoutingModel_AddVariableMaximizedByFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static long RoutingModel_End(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool RoutingModel_AddDimension(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3, long jarg4, bool jarg5, string jarg6)
static bool RoutingModel_ApplyLocksToAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, int len2_1, int[] len2_2, long[] jarg2, bool jarg3)
int GetNumberOfDisjunctions()
Definition: RoutingModel.cs:250
static int RoutingModel_RegisterUnaryTransitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, LongToLong jarg2)
static long RoutingModel_GetArcCostForVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4)
void AddRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
Definition: RoutingModel.cs:317
int RegisterPositiveUnaryTransitCallback(LongToLong callback)
Definition: RoutingModel.cs:111
static void RoutingModel_SetArcCostEvaluatorOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
void SetArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle)
Definition: RoutingModel.cs:356
static global::System.IntPtr RoutingModel_MakeGuidedSlackFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, LongToLong jarg3)
void CloseModel()
Definition: RoutingModel.cs:446
long[] GetAmortizedQuadraticCostFactorOfVehicles()
Definition: RoutingModel.cs:393
bool ApplyLocksToAllVehicles(long[][] locks, bool close_routes)
Definition: RoutingModel.cs:498
bool IsEnd(long index)
Definition: RoutingModel.cs:608
void CopyTo(int[] array)
Definition: constraint_solver/IntVector.cs:113
long[] GetDisjunctionIndices(int index)
Definition: RoutingModel.cs:228
long GetArcCostForFirstSolution(long from_index, long to_index)
Definition: RoutingModel.cs:685
int AddDisjunction(long[] indices)
Definition: RoutingModel.cs:212
static long RoutingModel_GetArcCostForClass(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4)
int RegisterPositiveTransitCallback(LongLongToLong callback)
Definition: RoutingModel.cs:121
static readonly int PICKUP_AND_DELIVERY_NO_ORDER
Definition: RoutingModel.cs:807
void SetAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor)
Definition: RoutingModel.cs:373
static global::System.IntPtr RoutingModel_GetMutableDimension(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
bool CostsAreHomogeneousAcrossVehicles()
Definition: RoutingModel.cs:675
static int RoutingModel_AddDisjunction__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static int RoutingModel_GetStatus(global::System.Runtime.InteropServices.HandleRef jarg1)
RoutingDimension GetDimensionOrDie(string dimension_name)
Definition: RoutingModel.cs:181
int VehicleIndex(int index)
Definition: RoutingModel.cs:613
static bool RoutingModel_AddDimensionWithVehicleTransits(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2, long jarg3, long jarg4, bool jarg5, string jarg6)
int GetCostClassesCount()
Definition: RoutingModel.cs:704
static readonly int PICKUP_AND_DELIVERY_FIFO
Definition: RoutingModel.cs:809
static int RoutingModel_GetCostClassesCount(global::System.Runtime.InteropServices.HandleRef jarg1)
void IgnoreDisjunctionsAlreadyForcedToZero()
Definition: RoutingModel.cs:255
static int RoutingModel_ROUTING_FAIL_TIMEOUT_get()
static int RoutingModel_GetNumberOfVisitTypes(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoutingModel_AssignmentToRoutes(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int len3_1, int[] len3_2, long[] jarg3)
void AddAtSolutionCallback(VoidToVoid callback)
Definition: RoutingModel.cs:426
static void RoutingModel_SetArcCostEvaluatorOfAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
Assignment CompactAssignment(Assignment assignment)
Definition: RoutingModel.cs:567
static readonly int TYPE_ADDED_TO_VEHICLE
Definition: RoutingModel.cs:812
static readonly int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED
Definition: RoutingModel.cs:815
static void RoutingModel_AddIntervalToAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int RoutingModel_AddDisjunction__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, long jarg3, long jarg4)
static global::System.IntPtr RoutingModel_GetAmortizedLinearCostFactorOfVehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
Assignment ReadAssignmentFromRoutes(long[][] routes, bool ignore_inactive_indices)
Definition: RoutingModel.cs:539
RoutingModel(RoutingIndexManager index_manager)
Definition: RoutingModel.cs:98
void AddIntervalToAssignment(IntervalVar interval)
Definition: RoutingModel.cs:585
bool HasVehicleWithCostClassIndex(int cost_class_index)
Definition: RoutingModel.cs:699
static global::System.IntPtr RoutingModel_ActiveVar(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
IntVar VehicleCostsConsideredVar(int vehicle)
Definition: RoutingModel.cs:652
bool IsVehicleAllowedForIndex(int vehicle, long index)
Definition: RoutingModel.cs:267
long GetDisjunctionPenalty(int index)
Definition: RoutingModel.cs:240
int GetVisitType(long index)
Definition: RoutingModel.cs:302
IntVar NextVar(long index)
Definition: RoutingModel.cs:640
void AddPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction)
Definition: RoutingModel.cs:276
void AddSoftSameVehicleConstraint(long[] indices, long cost)
Definition: RoutingModel.cs:259
static long RoutingModel_UnperformedPenaltyOrValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static global::System.IntPtr RoutingModel_GetDisjunctionIndices__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
int RegisterUnaryTransitCallback(LongToLong callback)
Definition: RoutingModel.cs:106
static bool RoutingModel_IsMatchingModel(global::System.Runtime.InteropServices.HandleRef jarg1)
void AddToAssignment(IntVar var)
Definition: RoutingModel.cs:581
static long RoutingModel_kNoPenalty_get()
static global::System.IntPtr RoutingModel_CostVar(global::System.Runtime.InteropServices.HandleRef jarg1)
bool IsVehicleUsed(Assignment assignment, int vehicle)
Definition: RoutingModel.cs:624
long GetFixedCostOfVehicle(int vehicle)
Definition: RoutingModel.cs:368
static bool RoutingModel_IsVehicleUsed(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3)
static int RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT_get()
static void RoutingModel_AddLocalSearchOperator(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
int GetNumberOfVisitTypes()
Definition: RoutingModel.cs:312
static int RoutingModel_GetVehicleClassesCount(global::System.Runtime.InteropServices.HandleRef jarg1)
int AddDisjunction(long[] indices, long penalty)
Definition: RoutingModel.cs:208
static int RoutingModel_GetVehicleClassIndexOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr RoutingModel_GetSameVehicleIndicesOfIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
bool AddDimension(int evaluator_index, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name)
Definition: RoutingModel.cs:126
static int RoutingModel_RegisterPositiveUnaryTransitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, LongToLong jarg2)
void AddLocalSearchFilter(LocalSearchFilter filter)
Definition: RoutingModel.cs:589
static readonly int ROUTING_INVALID
Definition: RoutingModel.cs:804
static long RoutingModel_GetNumberOfRejectsInFirstSolution(global::System.Runtime.InteropServices.HandleRef jarg1, int search_parameters_size, byte[] jarg2)
void CopyTo(long[] array)
Definition: constraint_solver/Int64Vector.cs:113
static int RoutingModel_GetNumberOfDisjunctions(global::System.Runtime.InteropServices.HandleRef jarg1)
static long RoutingModel_GetDisjunctionMaxCardinality(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool RoutingModel_HasDimension(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
void AddRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
Definition: RoutingModel.cs:322
Assignment PreAssignment()
Definition: RoutingModel.cs:507
static int RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED_get()
static int RoutingModel_GetPickupAndDeliveryPolicyOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
int GetVehicleClassesCount()
Definition: RoutingModel.cs:718
static void RoutingModel_CloseModelWithParameters(global::System.Runtime.InteropServices.HandleRef jarg1, int search_parameters_size, byte[] jarg2)
static long kNoPenalty
Definition: RoutingModel.cs:77
bool AddDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name)
Definition: RoutingModel.cs:144
Definition: algorithms/Int64Vector.cs:11
static readonly int ROUTING_SUCCESS
Definition: RoutingModel.cs:801
bool ArcIsMoreConstrainedThanArc(long from, long to1, long to2)
Definition: RoutingModel.cs:735
static global::System.IntPtr RoutingModel_Solve__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
bool IsStart(long index)
Definition: RoutingModel.cs:603
static void RoutingModel_AddToAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
IntVarVector VehicleVars()
Definition: RoutingModel.cs:635
static int RoutingModel_RegisterPositiveTransitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, LongLongToLong jarg2)
static long RoutingModel_GetFixedCostOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
bool AddDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name)
Definition: RoutingModel.cs:138
static int RoutingModel_GetCostClassIndexOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
void AddVariableMaximizedByFinalizer(IntVar var)
Definition: RoutingModel.cs:434
long GetHomogeneousCost(long from_index, long to_index)
Definition: RoutingModel.cs:680
int AddDisjunction(long[] indices, long penalty, long max_cardinality)
Definition: RoutingModel.cs:204
static void RoutingModel_SetPickupAndDeliveryPolicyOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static long RoutingModel_Start(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static readonly int ROUTING_FAIL
Definition: RoutingModel.cs:802
bool AddConstantDimension(long value, long capacity, bool fix_start_cumul_to_zero, string name)
Definition: RoutingModel.cs:156
DecisionBuilder MakeSelfDependentDimensionFinalizer(RoutingDimension dimension)
Definition: RoutingModel.cs:793
static global::System.IntPtr RoutingModel_MutablePreAssignment(global::System.Runtime.InteropServices.HandleRef jarg1)
static int RoutingModel_ROUTING_FAIL_get()
static void RoutingModel_SetFixedCostOfAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void RoutingModel_SetFixedCostOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, int jarg3)
static global::System.IntPtr RoutingModel_NextVar(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
int[] GetDisjunctionIndices(long index)
Definition: RoutingModel.cs:216
static global::System.IntPtr RoutingModel_GetAmortizedQuadraticCostFactorOfVehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
Definition: ProtoHelper.cs:20
Constraint MakePathSpansAndTotalSlacks(RoutingDimension dimension, IntVarVector spans, IntVarVector total_slacks)
Definition: RoutingModel.cs:168
static void RoutingModel_AddPickupAndDelivery(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static global::System.IntPtr RoutingModel_ReadAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
Assignment RestoreAssignment(Assignment solution)
Definition: RoutingModel.cs:532
long ComputeLowerBound()
Definition: RoutingModel.cs:482
bool WriteAssignment(string file_name)
Definition: RoutingModel.cs:519
static int RoutingModel_kNoDisjunction_get()
static global::System.Exception Retrieve()
int RegisterTransitCallback(LongLongToLong callback)
Definition: RoutingModel.cs:116
static long RoutingModel_ComputeLowerBound(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void Dispose(bool disposing)
Definition: RoutingModel.cs:40
static int RoutingModel_RegisterTransitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, LongLongToLong jarg2)
static bool RoutingModel_AreEmptyRouteCostsConsideredForVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
long Next(Assignment assignment, long index)
Definition: RoutingModel.cs:618
static void RoutingModel_AddSoftSameVehicleConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, long jarg3)
string GetPrimaryConstrainedDimension()
Definition: RoutingModel.cs:199
static global::System.IntPtr RoutingModel_VehicleVars(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool RoutingModel_RoutesToAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, int len2_1, int[] len2_2, long[] jarg2, bool jarg3, bool jarg4, global::System.Runtime.InteropServices.HandleRef jarg5)
int Count
Definition: constraint_solver/Int64Vector.cs:101
static global::System.IntPtr RoutingModel_ReadAssignmentFromRoutes(global::System.Runtime.InteropServices.HandleRef jarg1, int len2_1, int[] len2_2, long[] jarg2, bool jarg3)
static global::System.IntPtr RoutingModel_CompactAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type)
Definition: RoutingModel.cs:332
long GetArcCostForVehicle(long from_index, long to_index, long vehicle)
Definition: RoutingModel.cs:670
static int RoutingModel_TYPE_ADDED_TO_VEHICLE_get()
Assignment SolveWithParameters(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
Definition: RoutingModel.cs:466
static readonly int PICKUP_AND_DELIVERY_LIFO
Definition: RoutingModel.cs:808
Assignment Solve(Assignment assignment)
Definition: RoutingModel.cs:454
static bool RoutingModel_IsEnd(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
RoutingDimension GetMutableDimension(string dimension_name)
Definition: RoutingModel.cs:187
string DebugOutputAssignment(Assignment solution_assignment, string dimension_to_print)
Definition: RoutingModel.cs:740
void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost)
Definition: RoutingModel.cs:438
static void RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool RoutingModel_IsVehicleAllowedForIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3)
static global::System.IntPtr RoutingModel_MakeSelfDependentDimensionFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
delegate long LongLongToLong(long t, long u)
Parameters defining the search used to solve vehicle routing problems.
Definition: RoutingParameters.pb.cs:141
static void RoutingModel_AddPickupAndDeliverySets(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
void SetVisitType(long index, int type, int type_policy)
Definition: RoutingModel.cs:298
static int RoutingModel_GetVisitType(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)