Events for synchronization
To allow for more advanced thread synchronization during parallel solves, AIMMS offers synchronization objects called events, which can be manipulated using the function listed in this table.
Through the function
GMP::Event::Create you can create a new event,
while the function
GMP::Event::Delete deletes existing events. Using
GMP::Event::Set you can notify AIMMS that an event has
occurred. The function
GMP::Event::Reset resets the event.
Waiting for events
expect a subset of the set
their arguments, these functions can be used to wait for both solver
session completion and the occurrence of events.
You can use events, for example, to notify the main thread of execution in your model that you want a new mathematical program instance to be generated and solved asynchronously based on input data provided by a solver callback. AIMMS does not allow asynchronous solves to be started from within a callback itself.