/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
get_model()->get_action_heap().remove(this);
if (modified_set_hook_.is_linked())
simgrid::xbt::intrusive_erase(*get_model()->get_modified_set(), *this);
get_model()->get_action_heap().remove(this);
if (modified_set_hook_.is_linked())
simgrid::xbt::intrusive_erase(*get_model()->get_modified_set(), *this);
sharing_priority_ = weight;
get_model()->get_maxmin_system()->update_variable_weight(get_variable(), weight);
sharing_priority_ = weight;
get_model()->get_maxmin_system()->update_variable_weight(get_variable(), weight);
if (modified_set_hook_.is_linked())
simgrid::xbt::intrusive_erase(*get_model()->get_modified_set(), *this);
get_model()->get_action_heap().remove(this);
}
}
if (modified_set_hook_.is_linked())
simgrid::xbt::intrusive_erase(*get_model()->get_modified_set(), *this);
get_model()->get_action_heap().remove(this);
}
}
XBT_IN("(%p)", this);
if (suspended_ != SuspendStates::sleeping) {
get_model()->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
XBT_IN("(%p)", this);
if (suspended_ != SuspendStates::sleeping) {
get_model()->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
get_model()->get_action_heap().remove(this);
if (state_set_ == get_model()->get_started_action_set() && sharing_priority_ > 0) {
// If we have a lazy model, we need to update the remaining value accordingly
get_model()->get_action_heap().remove(this);
if (state_set_ == get_model()->get_started_action_set() && sharing_priority_ > 0) {
// If we have a lazy model, we need to update the remaining value accordingly
if (suspended_ != SuspendStates::sleeping) {
get_model()->get_maxmin_system()->update_variable_weight(get_variable(), get_priority());
suspended_ = SuspendStates::not_suspended;
if (suspended_ != SuspendStates::sleeping) {
get_model()->get_maxmin_system()->update_variable_weight(get_variable(), get_priority());
suspended_ = SuspendStates::not_suspended;
- /* update remains before return it */
- if (get_model()->get_update_algorithm() == Model::UpdateAlgo::Lazy) /* update remains before return it */
+ /* update remains before returning it */
+ if (get_model()->get_update_algorithm() == Model::UpdateAlgo::LAZY) /* update remains before return it */
- double_update(&max_duration_, delta, sg_surf_precision);
+ if (max_duration_ != NO_MAX_DURATION)
+ double_update(&max_duration_, delta, sg_surf_precision);