Home About Documentation Install Newsline Links Feedback Appeal Guestbook
since 2007/10/24
OpenOpt result structure fields
Solving of every problem in OpenOpt is performed via
r = p.solve(nameOfSolver) # nameOfSolver is string like 'ralg', 'nssolve', 'scipy_fsolve' etc
Let's check typical r fields:
>>> dir(r)
['__doc__', '__module__', 'advanced', 'elapsed', 'evals', 'ff', 'isFeasible', 'istop', 'iterValues', 'msg', 'rf', 'solverInfo', 'stopcase', 'xf']
xf and ff are final point and objFun value (i.e. optimal ones, if solver really has obtained solution required).
rf is maximal residual of point xf. If r.rf > p.contol, OpenOpt treats the solution as infeasible: r.isFeasible = False; otherwise True.
istop is stop case (integer or float number), msg is stop case message, like
|| gradient F(X[k]) || < gradtol
r.evals and r.elapsed are Python dictionaries of elapsed functions evaluations and [cpu]time, for example
{'c': 285, 'dh': 215, 'f': 285, 'df': 215, 'h': 285, 'dc': 208, 'iter': 248} and
{'plot_time': 4.8099999999999996, 'solver_cputime': 0.44999999999999929, 'solver_time': 1.0900000000000007, 'plot_cputime': 3.9600000000000009}
r.iterValues currently has fields 'f' and 'x'. r.iterValues.f is Python list of objFun values (iter 0, iter1, ...), r.iterValues.x is similar Python list for points. Maybe, 'r' field will be added soon for residuals.
stopcase can be -1 (solver failed to solve the problem), +1 (solver reports he has solved the problem, and solution (checked by OO Kernel) is feasible), or 0 (maxIter, maxFuncEvals, maxTime or maxCPUTime have been exceeded; currently it is 0 for both feasible and infeasible xf, but it may be changed in future, so you'd better to check it by yourself).
'solverInfo' is Python dictionary with alg, authors, license, homepage (and may be other) fields:
>>> r.solverInfo
{'alg': 'Augmented Lagrangian Multipliers', 'homepage': 'http://www.ime.usp.br/~egbirgin/tango/', 'license': 'GPL', 'authors': 'J. M. Martinez martinezimecc-at-gmail.com, Ernesto G. Birgin egbirgin-at-ime.usp.br, Jan Marcel Paiva Gentil jgmarcel-at-ime.usp.br'}
'advanced' is reserved for future purposes.
