Getting Information about the Generated Solver
In order to obtain information on the solver such as its expected input arguments (parameters) and outputs, simply type
where SOLVERNAME is the name you have given to the solver.
Calling the Solver
Once all input parameters have been populated, the Matlab/Python wrapper of the solver can be used to invoke it.
[output, exitflag, info ] = SOLVERNAME( params );
[output, exitflag, info] = SOLVERNAME.SOLVERNAME_solve( params )
One should always check whether the solver has exited without an error before using the solution. The exitflag can have the following values:
||Optimal solution found to the requested accuracy.
||(only branch-and-bound) A feasible point has been identified for which the objective value is no more than codeoptions.mip.mipgap*100 per cent worse than the global optimum.
||Timeout - maximum number of iterations or maximum computation time of codeoptions.mip.timeout (only branch-and-bound) reached. The returned solution is the best one found so far.
||(only branch-and-bound) Infeasible problem (problems solving the root relaxation to desired accuracy)
||(only branch-and-bound) Out of memory - cannot fit branch and bound nodes into pre-allocated memory.
||The convex solver could not proceed due to stalled line search. The problem might be infeasible. Otherwise, please submit a bug report to support(at)embotech.com including all data necessary to reproduce the problem. You can also run FORCESdiagnostics on your problem to check for most common errors in the formulation.
||The convex solver could not proceed due to an internal error. The problem might be infeasible. Otherwise, please submit a bug report to support(at)embotech.com including all data necessary to reproduce the problem. You can also run FORCESdiagnostics on your problem to check for most common errors in the formulation.
||License error. If you have generated code with a simulation license, it will run only on the machine from which the code has been generated. In some cases, e.g. when connected to a VPN network, the FORCES Pro license checker produces a false negative. Re-run the code generation script in this case to make sure licensing information is correctly set.
Additional solve diagnostics
The solver returns additional information to the optimizer in the info struct. Some of the fields are described below. Depending on the method used there will also be other fields describing the quality of the returned result.
||Number of iterations. In branch-and-bound mode this is the number of convex problems solved in total.
||Total computation time in seconds.
||Value of the objective function.
||(only branch-and-bound) Number of convex problems solved for finding the optimal solution. Note that often the optimal solution is found early in the search, but in order to certify (sub-)optimality, all branches have to be explored.