Package org.jacop.fz

Class Solve

  • All Implemented Interfaces:
    ParserTreeConstants

    public class Solve
    extends java.lang.Object
    implements ParserTreeConstants
    The parser part responsible for parsing the solve part of the flatzinc file, building a related search and executing it.

    Current implementation runs also final search on all variables to ensure that they are ground.

    Version:
    4.7
    • Constructor Detail

      • Solve

        public Solve​(Store store,
                     SatTranslation sat)
        It creates a parser for the solve part of the flatzinc file.
        Parameters:
        store - the constraint store within which context the search will take place.
        sat - sat translation used
    • Method Detail

      • search

        public void search​(ASTSolveItem node,
                           Tables table,
                           Options opt)
        It parses the solve part.
        Parameters:
        node - the current parsing node.
        table - the table containing all the various variable definitions encoutered thus far.
        opt - option specifies to flatzinc parser in respect to search (e.g. all solutions).
      • parseSearchAnnotations

        java.util.ArrayList<SearchItem> parseSearchAnnotations​(java.util.ArrayList<SearchItem> search_seq)
      • statistics

        public void statistics​(boolean result)
      • printStatisticsIterrupt

        public void printStatisticsIterrupt()
      • printStatistics

        public void printStatistics​(boolean interrupted,
                                    boolean result)
      • printStatisticsForSingleSearch

        void printStatisticsForSingleSearch​(boolean interrupted,
                                            boolean result)
      • run_sequence_search

        void run_sequence_search​(int solveKind,
                                 SimpleNode kind,
                                 SearchItem si)
      • printStatisticsForSeqSearch

        void printStatisticsForSeqSearch​(boolean interrupted,
                                         boolean result)
      • getSearchTime_ms

        double getSearchTime_ms()
      • getInitTime_ms

        double getInitTime_ms()
      • anyTimeOutOccured

        boolean anyTimeOutOccured​(java.util.ArrayList<Search<Var>> list_seq_searches)
      • printSolution

        void printSolution()
      • getKind

        int getKind​(java.lang.String k)
      • credit_search

        void credit_search​(DepthFirstSearch<Var> label,
                           int creditValue,
                           int bbsValue)
      • getSolveKind

        public int getSolveKind()
      • helperSolutionPrinter

        void helperSolutionPrinter​(java.lang.String lastSolution)
      • startTimer

        void startTimer()