In order to let the server do dynamic calculations on the Optimizer's result it need to be available, preferable without doing a full recalculation.
One solution could be to cache the result temporarily on the server and only recalculate if the result is not found in the cache.
A second solution is to bundle the result object in a pickled form into the API response.
This, however, does require some care as accepting a pickled object and calling methods basically corresponds to allowing client direct code execution.
A solution to the security risk is to encrypt the pickle with a key only known to the server so that it can be verified and decrypted when received for further processing.
In order to let the server do dynamic calculations on the Optimizer's result it need to be available, preferable without doing a full recalculation.
One solution could be to cache the result temporarily on the server and only recalculate if the result is not found in the cache.
A second solution is to bundle the result object in a pickled form into the API response.
This, however, does require some care as accepting a pickled object and calling methods basically corresponds to allowing client direct code execution.
A solution to the security risk is to encrypt the pickle with a key only known to the server so that it can be verified and decrypted when received for further processing.