Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
main.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.1
4 *
5 * Do not make changes to this file unless you know what you are doing - modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9package com.google.ortools.constraintsolver;
10
11public class main implements mainConstants {
12 public static long CpRandomSeed() {
13 return mainJNI.CpRandomSeed();
14 }
15
22 public static long zero() {
23 return mainJNI.zero();
24 }
25
29 public static long One() {
30 return mainJNI.One();
31 }
32
41 public static void setAssignmentFromAssignment(Assignment target_assignment, IntVar[] target_vars, Assignment source_assignment, IntVar[] source_vars) {
42 mainJNI.setAssignmentFromAssignment(Assignment.getCPtr(target_assignment), target_assignment, target_vars, Assignment.getCPtr(source_assignment), source_assignment, source_vars);
43 }
44
45 public static boolean areAllBound(IntVar[] vars) {
46 return mainJNI.areAllBound(vars);
47 }
48
49 public static boolean areAllBooleans(IntVar[] vars) {
50 return mainJNI.areAllBooleans(vars);
51 }
52
56 public static boolean areAllBoundTo(IntVar[] vars, long value) {
57 return mainJNI.areAllBoundTo(vars, value);
58 }
59
60 public static long maxVarArray(IntVar[] vars) {
61 return mainJNI.maxVarArray(vars);
62 }
63
64 public static long minVarArray(IntVar[] vars) {
65 return mainJNI.minVarArray(vars);
66 }
67
68 public static long posIntDivUp(long e, long v) {
69 return mainJNI.posIntDivUp(e, v);
70 }
71
72 public static long posIntDivDown(long e, long v) {
73 return mainJNI.posIntDivDown(e, v);
74 }
75
77 byte[] buf = mainJNI.defaultRoutingModelParameters();
78 if (buf == null || buf.length == 0) {
79 return null;
80 }
81 try {
82 return com.google.ortools.constraintsolver.RoutingModelParameters.parseFrom(buf);
83 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
84 throw new RuntimeException(
85 "Unable to parse com.google.ortools.constraintsolver.RoutingModelParameters protocol message.");
86 }
87}
88
90 byte[] buf = mainJNI.defaultRoutingSearchParameters();
91 if (buf == null || buf.length == 0) {
92 return null;
93 }
94 try {
95 return com.google.ortools.constraintsolver.RoutingSearchParameters.parseFrom(buf);
96 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
97 throw new RuntimeException(
98 "Unable to parse com.google.ortools.constraintsolver.RoutingSearchParameters protocol message.");
99 }
100}
101
106 public static String findErrorInRoutingSearchParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
107 return mainJNI.findErrorInRoutingSearchParameters(search_parameters.toByteArray());
108 }
109
116 public static boolean SolveModelWithSat(RoutingModel model, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, Assignment initial_solution, Assignment solution) {
117 return mainJNI.SolveModelWithSat(RoutingModel.getCPtr(model), model, search_parameters.toByteArray(), Assignment.getCPtr(initial_solution), initial_solution, Assignment.getCPtr(solution), solution);
118 }
119
120}
static void setAssignmentFromAssignment(Assignment target_assignment, IntVar[] target_vars, Assignment source_assignment, IntVar[] source_vars)
Definition main.java:41
static long minVarArray(IntVar[] vars)
Definition main.java:64
static boolean SolveModelWithSat(RoutingModel model, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, Assignment initial_solution, Assignment solution)
Definition main.java:116
static boolean areAllBooleans(IntVar[] vars)
Definition main.java:49
static long maxVarArray(IntVar[] vars)
Definition main.java:60
static boolean areAllBound(IntVar[] vars)
Definition main.java:45
static long posIntDivUp(long e, long v)
Definition main.java:68
static boolean areAllBoundTo(IntVar[] vars, long value)
Definition main.java:56
static com.google.ortools.constraintsolver.RoutingSearchParameters defaultRoutingSearchParameters()
Definition main.java:89
static com.google.ortools.constraintsolver.RoutingModelParameters defaultRoutingModelParameters()
Definition main.java:76
static long posIntDivDown(long e, long v)
Definition main.java:72
static String findErrorInRoutingSearchParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Definition main.java:106