This goal uses the search goal provided by the caller, and expects that this goal instantiates the cost every time when a solution is found. To search for a solution which provides the minimal cost, GoalFastMinimize finds a solution, posts the constraint that the cost variable should be less then the found cost and continues the search.
In contrast with GoalMinimize, when a solution is found GoalFastMinimize does not restore all decision variables, but continues the search just with a more strict constraint to the cost variable. When there are no solutions anymore, the latest found solution is the optimal one.
By default, GoalFastMinimize calculates the optimal solution twice. If the caller's search goal saves every found solution itself, the caller may specify the mode "goal_saves_solution" to prevent the duplicate calculation at the end of the search. @see GoalMinimize
|
|