#include <py_solver.h>
◆ PyDynamicNetworkSolverStrategy()
◆ describe_callback_context()
std::vector< std::tuple< std::string, std::string > > PyDynamicNetworkSolverStrategy::describe_callback_context |
( |
| ) |
const |
|
overrideprivatevirtual |
Describe the context that will be passed to the callback function.
- Returns
- A vector of tuples, each containing a string for the parameter's name and a string for its type.
This method should be overridden by derived classes to provide a description of the context that will be passed to the callback function. The intent of this method is that an end user can investigate the context that will be passed to the callback function, and use this information to craft their own callback function.
Implements gridfire::solver::NetworkSolverStrategy< DynamicEngine >.
◆ evaluate()
◆ set_callback()
void PyDynamicNetworkSolverStrategy::set_callback |
( |
const std::any & | callback | ) |
|
|
overrideprivatevirtual |
set the callback function to be called at the end of each timestep.
This function allows the user to set a callback function that will be called at the end of each timestep. The callback function will receive a gridfire::solver::<SOMESOLVER>::TimestepContext object. Note that depending on the solver, this context may contain different information. Further, the exact signature of the callback function is left up to each solver. Every solver should provide a type or type alias TimestepCallback that defines the signature of the callback function so that the user can easily get that type information.
- Parameters
-
callback | The callback function to be called at the end of each timestep. |
Implements gridfire::solver::NetworkSolverStrategy< DynamicEngine >.
The documentation for this class was generated from the following files: