Commit 2e7c66ad authored by Mohcine Chraibi's avatar Mohcine Chraibi

Change condition for adding to source queues

- Stop source thread if max sim time is reached
- Don't put agents in sources, before the content of queues is generated
- in the _building
parent 260ee5ef
Pipeline #9197 failed with stages
in 6 minutes and 48 seconds
This diff is collapsed.
......@@ -119,9 +119,12 @@ public:
/**
* Return the total number of agents that will be generated.
* used by visualisation to allocate space
*
*/
long GetMaxAgentNumber() const;
int GetMaxSimTime() const;
void SetMaxSimTime(int t);
private:
......@@ -173,6 +176,7 @@ private:
std::vector<std::shared_ptr<AgentsSource> > _sources;
///to control the trigger of the events
long int _lastUpdateTime = 0;
int maxSimTime = 0;
/// building object
Building* _building=nullptr;
/// whether all agents have been dispatched
......
Markdown is supported
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