Commit 5ec0d196 authored by Ulrich Kemloh's avatar Ulrich Kemloh

cleaning and formatting

parent 8d54d98a
......@@ -218,7 +218,8 @@ bool EventManager::UpdateAgentKnowledge(Building* _b)
vector<Pedestrian*> informant;
for(auto&& ped:_b->GetAllPedestrians())
{
if (ped->GetNewEventFlag())informant.push_back(ped);
if (ped->GetNewEventFlag())
informant.push_back(ped);
}
......@@ -232,8 +233,10 @@ bool EventManager::UpdateAgentKnowledge(Building* _b)
{
//maybe same room and subroom ?
if(_b->IsVisible(ped1->GetPos(),ped2->GetPos()))
MergeKnowledge(ped1, ped2); //ped1->SetSpotlight(true);
ped2->SetNewEventFlag(true);
{
MergeKnowledge(ped1, ped2); //ped1->SetSpotlight(true);
ped2->SetNewEventFlag(true);
}
}
}
}
......@@ -271,7 +274,7 @@ bool EventManager::UpdateAgentKnowledge(Building* _b)
//Clear the memory and attempt to reroute
//this can happen if all doors are known to be closed
ped->ClearKnowledge();
//Log->Write("ERROR: \t clearing ped knowledge");
Log->Write("ERROR: \t clearing ped knowledge");
if(UpdateRoute(ped)==false)
{
Log->Write("ERROR: \t cannot reroute the pedestrian. unknown problem");
......@@ -307,8 +310,8 @@ bool EventManager::UpdateRoute(Pedestrian* ped)
}
else
{
//Log->Write("WARNING: \t unknown configuration <%s>", key.c_str());
//Log->Write("WARNING: \t [%d] router available", _eventEngineStorage.size());
Log->Write("WARNING: \t unknown configuration <%s>", key.c_str());
Log->Write("WARNING: \t [%d] router available", _eventEngineStorage.size());
//Log->Write(" : \t trying to create");
//CreateRoutingEngine(_building);
status= false;
......
......@@ -2,11 +2,11 @@
<JuPedSim project="JPS-Project" version="0.6"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_ini_core.xsd">
xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_ini_core.xsd">
<!-- seed used for initialising random generator -->
<seed>12542</seed>
<max_sim_time>900</max_sim_time>
<max_sim_time>900</max_sim_time>
<!-- geometry file -->
<geometry>geo.xml</geometry>
<!-- trajectories file and format -->
......@@ -21,9 +21,9 @@ xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_ini_core.xsd">
<!-- traffic information: e.g closed doors or smoked rooms -->
<traffic_constraints>
<!-- room states are: good or smoked -->
<!-- <rooms> -->
<!-- <room room_id="0" state="good" /> -->
<!-- </rooms> -->
<!-- <rooms> -->
<!-- <room room_id="0" state="good" /> -->
<!-- </rooms> -->
<!-- doors states are: close or open -->
<doors>
<door trans_id="1" caption="" state="open" />
......@@ -34,36 +34,36 @@ xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_ini_core.xsd">
<routing>
<goals>
<goal id="0" final="false" caption="goal 1">
<polygon>
<vertex px="-1.0" py="5.0" />
<vertex px="-1.0" py="6.5" />
<vertex px="-2.0" py="6.5" />
<vertex px="-2.0" py="5.0" />
<vertex px="-1.0" py="5.0" />
</polygon>
<polygon>
<vertex px="-1.0" py="5.0" />
<vertex px="-1.0" py="6.5" />
<vertex px="-2.0" py="6.5" />
<vertex px="-2.0" py="5.0" />
<vertex px="-1.0" py="5.0" />
</polygon>
</goal>
<goal id="1" final="false" caption="goal 2">
<polygon>
<vertex px="24.0" py="6.5" />
<vertex px="23.0" py="6.5" />
<vertex px="23.0" py="5.0" />
<vertex px="24.0" py="5.0" />
<vertex px="24.0" py="6.5" />
</polygon>
<polygon>
<vertex px="24.0" py="6.5" />
<vertex px="23.0" py="6.5" />
<vertex px="23.0" py="5.0" />
<vertex px="24.0" py="5.0" />
<vertex px="24.0" py="6.5" />
</polygon>
</goal>
</goals>
<!-- in the form goal_id1:goal_id2:goal_id3:..:goal_idn -->
<!-- <routes> -->
<!-- <route id="1">0:1:0:1:0:1:2</route> -->
<!-- <route id="2">0:1:0:1:2</route> -->
<!-- </routes> -->
<!-- <routes> -->
<!-- <route id="1">0:1:0:1:0:1:2</route> -->
<!-- <route id="2">0:1:0:1:2</route> -->
<!-- </routes> -->
</routing>
<!--persons information and distribution -->
<agents operational_model_id="1">
<agents_distribution>
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="50" router_id="7" />
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="50" router_id="7" />
</agents_distribution>
</agents>
......@@ -71,22 +71,22 @@ xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_ini_core.xsd">
<!-- These parameters may be overwritten -->
<operational_models>
<model operational_model_id="1" description="gcfm">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exitCrossingStrategy>3</exitCrossingStrategy>
<linkedcells enabled="true" cell_size="2.2" />
<force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
<force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>3</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
<force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.24" sigma="0.001" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.24" sigma="0.001" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
</model>
</operational_models>
......@@ -94,19 +94,15 @@ xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_ini_core.xsd">
<route_choice_models>
<router router_id="1" description="global_shortest">
<parameters>
<navigation_lines file="routing.xml" />
</parameters>
</router>
<router router_id="7" description="cognitive_map">
<sensors>
<sensor sensor_id="1" description="Room2Corridor" status="activated"/>
<sensor sensor_id="2" description="Jam" status="activated"/>
</sensors>
<cognitive_map status="empty"/>
<!--parameters>
<navigation_lines file="routing.xml" />
</parameters-->
<sensors>
<sensor sensor_id="1" description="Room2Corridor" status="activated" />
<sensor sensor_id="2" description="Jam" status="activated" />
</sensors>
<cognitive_map status="empty" />
</router>
</route_choice_models>
......
......@@ -6,7 +6,7 @@ xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_events.xsd">
<events update_frequency="2" update_radius="1" agents_color_by_knowledge="true">
<event time="15" type="door" state="close" id="8" caption="left_exit" />
<event time="50" type="door" state="open" id="8" caption="left_exit" />
<event time="50" type="door" state="close" id="4" caption="main_exit" />
<event time="51" type="door" state="close" id="4" caption="main_exit" />
<event time="100" type="door" state="open" id="4" caption="main_exit" />
<event time="130" type="door" state="close" id="8" caption="main_exit" />
</events>
......
......@@ -5,5 +5,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_events.xsd">
<events update_frequency="2" update_radius="1" agents_color_by_knowledge="true">
<event time="10" type="door" state="close" id="2" caption="exit" />
<event time="30" type="door" state="close" id="3" caption="exit" />
</events>
</JPScore>
<?xml version="1.0" encoding="UTF-8" ?>
<JuPedSim project="JPS-Project" version="0.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_ini_core.xsd">
<JuPedSim project="JPS-Project" version="0.6"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_ini_core.xsd">
<!-- seed used for initialising random generator -->
<seed>12542</seed>
......@@ -19,9 +21,8 @@
<traffic_constraints>
<!-- doors states are: close or open -->
<doors>
<door trans_id="5" caption="exit" state="close" />
<door trans_id="3" caption="exit" state="close" />
<door trans_id="5" caption="exit" state="open" />
<door trans_id="3" caption="exit" state="open" />
</doors>
</traffic_constraints>
......@@ -69,7 +70,7 @@
<!--persons information and distribution -->
<agents operational_model_id="2">
<agents_distribution>
<group group_id="0" room_id="0" subroom_id="0" number="1000" router_id="1" agent_parameter_id="1" />
<group group_id="0" room_id="0" subroom_id="0" number="500" router_id="1" agent_parameter_id="1" />
</agents_distribution>
</agents>
......@@ -106,12 +107,12 @@
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>3</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<linkedcells enabled="true" cell_size="3.4" />
<force_ped nu="3" b="0.25" c="3.0" />
<force_wall nu="10" b="0.70" c="3.0" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="0.5" sigma="0.0" />
<v0 mu="1.0" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
......@@ -119,7 +120,7 @@
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
<agent_parameters agent_parameter_id="2">
<v0 mu="0" sigma="0.0" />
<v0 mu="1.3" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
......
......@@ -838,16 +838,17 @@ int Pedestrian::GetColor()
{
string key=GetKnowledgeAsString();
std::hash<std::string> hash_fn;
color =hash_fn(key)%255;
color = hash_fn(key) % 255;
//cout<<"color: "<<hash_fn(key)<<endl;
//cout<<" key : "<<key<<endl;
}
break;
case BY_ROUTE:
{
string key=std::to_string(_routingStrategy);
string key = std::to_string(_routingStrategy);
std::hash<std::string> hash_fn;
color =hash_fn(key)%255;
color = hash_fn(key) % 255;
}
break;
......
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