Commit 98bd1c33 authored by Mohcine Chraibi's avatar Mohcine Chraibi

Merge branch 'develop' of https://gitlab.version.fz-juelich.de/jupedsim/jpscore into develop

parents 434128fc deb4b66c
Pipeline #14351 failed with stages
in 15 minutes and 8 seconds
......@@ -300,7 +300,7 @@ void Simulation::UpdateRoutesAndLocations()
auto allRooms = _building->GetAllRooms();
#pragma omp parallel for shared(pedsToRemove, allRooms)
for (unsigned int p = 0; p < allPeds.size(); ++p) {
for (signed int p = 0; p < allPeds.size(); ++p) {
auto ped = allPeds[p];
Room* room = _building->GetRoom(ped->GetRoomID());
SubRoom* sub0 = room->GetSubRoom(ped->GetSubRoomID());
......
......@@ -784,15 +784,19 @@ Room* Building::GetRoom(string caption) const
bool Building::AddCrossing(Crossing* line)
{
if (_crossings.count(line->GetID())!=0) {
char tmp[CLENGTH];
sprintf(tmp,
"ERROR: Duplicate index for crossing found [%d] in Routing::AddCrossing()",
line->GetID());
Log->Write(tmp);
exit(EXIT_FAILURE);
}
_crossings[line->GetID()] = line;
int IDRoom = line->GetRoom1()->GetID();
int IDLine = line->GetID();
int IDCrossing = 1000 * IDRoom + IDLine;
if (_crossings.count(IDCrossing) != 0)
{
char tmp[CLENGTH];
sprintf(tmp,
"ERROR: Duplicate index for crossing found [%d] in Routing::AddCrossing()",
IDCrossing);
Log->Write(tmp);
exit(EXIT_FAILURE);
}
_crossings[IDCrossing] = line;
return true;
}
......
......@@ -120,7 +120,7 @@ bool GradientModel::Init (Building* building)
pedsToRemove.clear();
bool error_occurred = false;
#pragma omp parallel for
for(unsigned int p=0;p<allPeds.size();p++) {
for(signed int p=0;p<allPeds.size();p++) {
Pedestrian* ped = allPeds[p];
double cosPhi, sinPhi;
//a destination could not be found for that pedestrian
......
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