Hi,
Is it possible for a callback procedure to save the newest incumbent solution to a case file.
Is an example available?
Edit:
I already installed a callback procedure (SetCallbackNewIncumbent).
How can I access the new incumbent solution from that procedure?
And do I need to send the new incumbent solution to the model first, after which I can send it to a case file, or can I send it to a case file directly?
Thanks!
Best, WM
Page 1 / 1
In the callback procedure, you can first use function RetrieveCurrentVariableValues to retrieve the variables value from the model;
Then use the .Incumbent suffix to retrieve the new incumbent value
Then use function like CaseFileSave to save those values you need.
code:
RetrieveCurrentVariableValues(AllVariables);
Then use the .Incumbent suffix to retrieve the new incumbent value
code:
MyVariable.Incumbent;
Then use function like CaseFileSave to save those values you need.
Hi,
Thanks for your answer, however I get this error...
The function RetrieveCurrentVariableValues cannot be called from a callback issued by GMP::SolverSessionExecute or GMP::SolverSession::AsynchronousExecute.
Any alternatives?
Thanks, W.
Thanks for your answer, however I get this error...
The function RetrieveCurrentVariableValues cannot be called from a callback issued by GMP::SolverSessionExecute or GMP::SolverSession::AsynchronousExecute.
Any alternatives?
Thanks, W.
Hi Wiet, in this case, you may need to use function GMP::Solution::RetrieveFromSolverSession
Great, thanks!
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.