alphaville / optimization-engine

Nonconvex embedded optimization: code generation for fast real-time optimization + ROS support
https://alphaville.github.io/optimization-engine/
Other
512 stars 53 forks source link

Convert TCP server response into an appropriate object #144

Closed c-mccullough closed 4 years ago

c-mccullough commented 5 years ago

OptimizerTcpManager.call() now returns a SolverResponse object. SolverResponse.get() is used to return a SolverStatus or SolverError object. When printing the output of the solver, it can be called as follows:

solution = mng.call([...]) print(json.dumps(solution.get_dict(), ...))

as opposed to:

print(json.dumps(solution, ...))

alphaville commented 5 years ago

@c-mccullough, very good! You just need to update the unit tests in Python (see here)

c-mccullough commented 5 years ago

The prior errors in regards to SolverResponse objects not being subscriptable have been fixed; the unsuccessful check does not seem to be consistent: https://travis-ci.org/c-mccullough/optimization-engine/builds/609479780?utm_source=github_status&utm_medium=notification