Class main

    • Constructor Detail

      • main

        public main()
    • Method Detail

      • CpRandomSeed

        public static long CpRandomSeed()
      • zero

        public static long zero()
        NOLINT
        This method returns 0. It is useful when 0 can be cast either as
        a pointer or as an integer value and thus lead to an ambiguous
        function call.
      • One

        public static long One()
        This method returns 1
      • setAssignmentFromAssignment

        public static void setAssignmentFromAssignment​(Assignment target_assignment,
                                                       IntVar[] target_vars,
                                                       Assignment source_assignment,
                                                       IntVar[] source_vars)
        NOLINT
        Given a "source_assignment", clears the "target_assignment" and adds
        all IntVars in "target_vars", with the values of the variables set according
        to the corresponding values of "source_vars" in "source_assignment".
        source_vars and target_vars must have the same number of elements.
        The source and target assignments can belong to different Solvers.
      • areAllBound

        public static boolean areAllBound​(IntVar[] vars)
      • areAllBooleans

        public static boolean areAllBooleans​(IntVar[] vars)
      • areAllBoundTo

        public static boolean areAllBoundTo​(IntVar[] vars,
                                            long value)
        Returns true if all variables are assigned to 'value'.
      • maxVarArray

        public static long maxVarArray​(IntVar[] vars)
      • minVarArray

        public static long minVarArray​(IntVar[] vars)
      • posIntDivUp

        public static long posIntDivUp​(long e,
                                       long v)
      • posIntDivDown

        public static long posIntDivDown​(long e,
                                         long v)
      • findErrorInRoutingSearchParameters

        public static java.lang.String findErrorInRoutingSearchParameters​(RoutingSearchParameters search_parameters)
        Returns an empty std::string if the routing search parameters are valid, and
        a non-empty, human readable error description if they're not.
      • SolveModelWithSat

        public static boolean SolveModelWithSat​(RoutingModel model,
                                                RoutingSearchParameters search_parameters,
                                                Assignment initial_solution,
                                                Assignment solution)
        Attempts to solve the model using the cp-sat solver. As of 5/2019, will
        solve the TSP corresponding to the model if it has a single vehicle.
        Therefore the resulting solution might not actually be feasible. Will return
        false if a solution could not be found.