Interface SolverFactory<Solution_>

    • Method Detail

      • createFromXmlResource

        static <Solution_> SolverFactory<Solution_> createFromXmlResource​(String solverConfigResource)
        Reads an XML solver configuration from the classpath and uses that SolverConfig to build a SolverFactory. The XML root element must be <solver>.
        Type Parameters:
        Solution_ - the solution type, the class with the PlanningSolution annotation
        Parameters:
        solverConfigResource - never null, a classpath resource as defined by ClassLoader.getResource(String)
        Returns:
        never null, subsequent changes to the config have no effect on the returned instance
      • createFromXmlFile

        static <Solution_> SolverFactory<Solution_> createFromXmlFile​(File solverConfigFile)
        Reads an XML solver configuration from the file system and uses that SolverConfig to build a SolverFactory.

        Warning: this leads to platform dependent code, it's recommend to use createFromXmlResource(String) instead.

        Type Parameters:
        Solution_ - the solution type, the class with the PlanningSolution annotation
        Parameters:
        solverConfigFile - never null
        Returns:
        never null, subsequent changes to the config have no effect on the returned instance
      • createFromXmlFile

        static <Solution_> SolverFactory<Solution_> createFromXmlFile​(File solverConfigFile,
                                                                      ClassLoader classLoader)
        Type Parameters:
        Solution_ - the solution type, the class with the PlanningSolution annotation
        Parameters:
        solverConfigFile - never null
        classLoader - sometimes null, the ClassLoader to use for loading all resources and Classes, null to use the default ClassLoader
        Returns:
        never null, subsequent changes to the config have no effect on the returned instance