1. A method for generating a pattern database for a model-based control system which employs target value searching, wherein said model-based control system includes a directed acyclic graph, wherein the directed acyclic graph includes a plurality of vertices interconnected by a plurality of edges, said method comprising the steps of: (a) selecting one or more of the plurality of vertices which are ready for processing in an inverse topological order; (b) processing the selected one or more of the plurality of vertices, wherein processing includes assigning a range bound to each of the selected one or more of the plurality of vertices; and, (c) repeating steps (a) to (b) until each of the plurality of vertices is processed, wherein the pattern database is computed in time linear to the number of vertices plus edges of the graph.