action.update_remains(lrint(action.get_variable()->get_value() * delta));
action.update_max_duration(delta);
- if (((action.get_remains_no_update() <= 0) && (action.get_variable()->get_weight() > 0)) ||
+ if (((action.get_remains_no_update() <= 0) && (action.get_variable()->get_penalty() > 0)) ||
((action.get_max_duration() != NO_MAX_DURATION) && (action.get_max_duration() <= 0))) {
action.finish(Action::State::FINISHED);
}
{
XBT_IN("(%p)", this);
if (is_running()) {
- get_model()->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
+ get_model()->get_maxmin_system()->update_variable_penalty(get_variable(), 0.0);
set_suspend_state(Action::SuspendStates::SUSPENDED);
}
XBT_OUT();