Commit deb570d0 authored by Kučera Petr RNDr. Ph.D.'s avatar Kučera Petr RNDr. Ph.D.
Browse files

Activity transition time in configuration

parent c1688e4a
......@@ -41,3 +41,4 @@ default-directory = data
max-duration-addition = 300
min-stop-duration = 60
allowed-delay = 60
transition-time=10
......@@ -144,5 +144,7 @@ Loco::CfgModel::Parse(const INISection &sect)
min_stop_duration =
sect.UnsignedValue("min-stop-duration").value_or(min_stop_duration);
allowed_delay = sect.UnsignedValue("allowed-delay").value_or(allowed_delay);
transition_time =
sect.UnsignedValue("transition-time").value_or(transition_time);
return true;
}
......@@ -71,6 +71,7 @@ namespace Loco
activity_time_type max_duration_addition{300};
activity_time_type min_stop_duration{60};
activity_time_type allowed_delay{60};
activity_time_type transition_time{10};
bool Parse(const INISection &sect);
};
......
......@@ -89,6 +89,7 @@ Loco::TrainRouteGraph::AddEnterActivity()
mActList.emplace_back(mTrain->Ident() + "Enter", mEnterPlace, false);
mActList.back().mMinDuration = kTrainActivityMinDuration;
mActList.back().mMaxDuration = kTrainActivityMaxDuration;
mActList.back().mTransitionTime = global_cfg.model.transition_time;
}
void
......@@ -97,6 +98,7 @@ Loco::TrainRouteGraph::AddLeaveActivity()
mActList.emplace_back(mTrain->Ident() + "Leave", mLeavePlace, true);
mActList.back().mMinDuration = kTrainActivityMinDuration;
mActList.back().mMaxDuration = kTrainActivityMaxDuration;
mActList.back().mTransitionTime = global_cfg.model.transition_time;
}
void
......@@ -141,6 +143,7 @@ Loco::TrainRouteGraph::AddElementActivities(unsigned element_id)
// TODO: Should be computed from the stop schedule
mActList.back().mMaxDuration = kMaxStopDuration;
}
mActList.back().mTransitionTime = global_cfg.model.transition_time;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment