git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5301
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf_private.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf_private.h"
+#include "network_common.h"
#include "xbt/dict.h"
#include "xbt/str.h"
#include "xbt/log.h"
#include "xbt/dict.h"
#include "xbt/str.h"
#include "xbt/log.h"
static lmm_system_t network_maxmin_system = NULL;
static void (*network_solve) (lmm_system_t) = NULL;
static lmm_system_t network_maxmin_system = NULL;
static void (*network_solve) (lmm_system_t) = NULL;
-static xbt_dict_t network_card_set = NULL;
-
static int card_number = 0;
static int host_number = 0;
static link_Constant_t **routing_table = NULL;
static int card_number = 0;
static int host_number = 0;
static link_Constant_t **routing_table = NULL;
static double share_resources(double now)
{
static double share_resources(double now)
{
- s_surf_action_network_Constant_t s_action;
surf_action_network_Constant_t action = NULL;
xbt_swag_t running_actions =
surf_network_model->common_public->states.running_action_set;
surf_action_network_Constant_t action = NULL;
xbt_swag_t running_actions =
surf_network_model->common_public->states.running_action_set;
- double min;
-
- min = generic_maxmin_share_resources(running_actions,
- xbt_swag_offset(s_action,
- variable),
- network_maxmin_system,
- network_solve);
xbt_swag_foreach(action, running_actions) {
if (action->latency > 0) {
xbt_swag_foreach(action, running_actions) {
if (action->latency > 0) {
static void update_actions_state(double now, double delta)
{
static void update_actions_state(double now, double delta)
{
surf_action_network_Constant_t action = NULL;
surf_action_network_Constant_t next_action = NULL;
xbt_swag_t running_actions =
surf_network_model->common_public->states.running_action_set;
xbt_swag_foreach_safe(action, next_action, running_actions) {
surf_action_network_Constant_t action = NULL;
surf_action_network_Constant_t next_action = NULL;
xbt_swag_t running_actions =
surf_network_model->common_public->states.running_action_set;
xbt_swag_foreach_safe(action, next_action, running_actions) {
if (action->latency > 0) {
if (action->latency > 0) {
- if (action->latency > deltap) {
- double_update(&(action->latency), deltap);
- deltap = 0.0;
+ if (action->latency > delta) {
+ double_update(&(action->latency), delta);
- double_update(&(deltap), action->latency);
action->latency = 0.0;
}
}
double_update(&(action->generic_action.remains),
action->latency = 0.0;
}
}
double_update(&(action->generic_action.remains),
- action->generic_action.cost * deltap/ CONSTANT_VALUE);
+ action->generic_action.cost * delta/ CONSTANT_VALUE);
if (action->generic_action.max_duration != NO_MAX_DURATION)
double_update(&(action->generic_action.max_duration), delta);
if (action->generic_action.max_duration != NO_MAX_DURATION)
double_update(&(action->generic_action.max_duration), delta);