Take the problem defined by all the constraints that have been set up so far, and solve it for the given objective function. If successful, instantiate all problem variables to their solution values.
This is a convenience predicate that combines solver setup, invocation and result retrieval. It is essentially defined as:
optimize(OptExpr, Cost, Options) :- eplex_solver_setup(Objective, _, Options, ) eplex_solve(Cost), eplex_get(vars, VArr), eplex_get(typed_solution, SolutionVector), VArr = SolutionVector. % do the bindings
For the solver options, see eplex_solver_setup/4.