1 /* Copyright (c) 2004-2021. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include "simgrid/forward.h"
11 /*** SURF Globals **************************/
13 /** @ingroup SURF_simulation
14 * @brief Finish simulation initialization
16 * This function must be called before the first call to surf_solve()
18 XBT_PUBLIC void surf_presolve();
20 /** @ingroup SURF_simulation
21 * @brief Performs a part of the simulation
22 * @param max_date Maximum date to update the simulation to, or -1
23 * @return the elapsed time, or -1.0 if no event could be executed
25 * This function execute all possible events, update the action states and returns the time elapsed.
26 * When you call execute or communicate on a model, the corresponding actions are not executed immediately but only
27 * when you call surf_solve.
28 * Note that the returned elapsed time can be zero.
30 XBT_PUBLIC double surf_solve(double max_date);
32 /** @ingroup SURF_simulation
33 * @brief Return the current time
35 * Return the current time in millisecond.
37 XBT_PUBLIC double surf_get_clock();
39 /* surf parse file related (public because called from a test suite) */
40 XBT_PUBLIC void parse_platform_file(const std::string& file);