Commit eee1c411 authored by Mohcine Chraibi's avatar Mohcine Chraibi

1. New working test scenario. 2. Clean file simple_run.sh: Keep only working...

1. New working test scenario. 2. Clean file simple_run.sh: Keep only working ini-files. To compile set the variable COMPILE to 1. 3. Ticket #23 fixed
parent c0d7b25f
......@@ -196,7 +196,6 @@ void Simulation::InitArgs(ArgumentParser* args) {
args->GetTauSigma());
s.append(_distribution->writeParameter());
_distribution->InitDistributor(args->GetProjectFile());
// define how the navigation line is crossed
int direction = args->GetExitStrategy();
sprintf(tmp, "\tDirection to the exit: %d\n", direction);
......@@ -268,6 +267,7 @@ void Simulation::InitArgs(ArgumentParser* args) {
}
case ROUTING_GLOBAL_SHORTEST:
{
Router* router=new GlobalRouter();
router->SetID(routerID);
router->SetStrategy(strategy);
......@@ -330,10 +330,7 @@ void Simulation::InitArgs(ArgumentParser* args) {
_building->LoadRoutingInfo(args->GetProjectFile());
_building->AddSurroundingRoom();
_building->InitGeometry(); // create the polygons
_building->LoadTrafficInfo();
// in the case the navigation mesh should be written to a file
if(args->GetNavigationMesh()!=""){
Log->Write("INFO: \tWriting the navigation mesh to: " + args->GetNavigationMesh());
......
......@@ -1091,7 +1091,6 @@ void Building::LoadRoutingInfo(const string &filename) {
Log->Write("INFO:\t done with loading extra routing information");
return;
}
TiXmlDocument docRouting(filename);
if (!docRouting.LoadFile()){
Log->Write("ERROR: \t%s", docRouting.ErrorDesc());
......
<?xml version="1.0" encoding="UTF-8" ?>
<JuPedSim project="JPS-Project" version="0.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ini.xsd">
<!-- seed used for initialising random generator -->
<seed>12542</seed>
<!-- geometry file -->
<geometry>1.2_bottleneck.xml</geometry>
<!-- traectories file and format -->
<trajectories format="xml-plain" embed_mesh="false" fps="8">
<file location="trajectorien_1.2_bottleneck.xml" />
</trajectories>
<!-- where to store the logs -->
<logfile>log</logfile>
<!-- 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="1" state="good" />
</rooms>
<!-- doors states are: close or open -->
<doors>
<door trans_id="2" caption="" state="open" />
</doors>
</traffic_constraints>
<routing>
<goals>
<goal id="0" final="true" caption="goal 1">
<polygon>
<vertex px="70" py="101" />
<vertex px="70" py="103" />
<vertex px="75" py="103" />
<vertex px="75" py="101" />
<vertex px="70" py="101" />
</polygon>
</goal>
</goals>
</routing>
<!--persons information and distribution -->
<agents>
<agents_distribution>
<group group_id="2" room_id="0" subroom_id="1" number="3" goal_id="0" router_id="1" route_id=""/>
<group group_id="0" room_id="0" subroom_id="2" number="4" goal_id="0" router_id="1" route_id="" />
<group group_id="1" room_id="1" number="10" goal_id="0" router_id="1" route_id="" />
</agents_distribution>
<!-- frequency in persons/minute -->
<agents_sources/>
</agents>
<!-- These parameters may be overwritten -->
<operational_models>
<model id="1" description="gcfm">
<parameters>
<tmax unit="sec">900</tmax>
<solver>euler</solver>
<stepsize>0.001</stepsize>
<exitCrossingStrategy>3</exitCrossingStrategy>
<linkedcells enabled="true" cell_size="2.2" />
<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" />
<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" />
</parameters>
</model>
</operational_models>
<route_choice_models>
<router router_id="1" description="global_shortest">
<parameters>
<!-- <navigation_lines file="routing.xml" /> -->
</parameters>
</router>
</route_choice_models>
</JuPedSim>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<routing version="0.4">
<trips>
<trip id="0">0:1:2</trip>
</trips>
<routing version="0.5">
<Hlines>
<!-- <Hline id="2" room_id="0" subroom_id="1"> -->
<!-- <vertex px="15.0" py="4.0" /> -->
<!-- <vertex px="17.0" py="6.0" /> -->
<!-- </Hline> -->
</Hlines>
</routing>
......@@ -229,11 +229,11 @@ Distribution* PedDistributor::GetTau() const {
}
void PedDistributor::InitDistributor(const string& filename){
_projectFilename=filename;
Log->Write("INFO: \tLoading and parsing the persons attributes");
TiXmlDocument doc(_projectFilename);
if (!doc.LoadFile()){
Log->Write("ERROR: \t%s", doc.ErrorDesc());
Log->Write("ERROR: \t could not parse the project file");
......@@ -282,6 +282,7 @@ void PedDistributor::InitDistributor(const string& filename){
dis->SetRouteId(route_id);
dis->SetRouterId(router_id);
dis->SetHeight(height);
if(e->Attribute("startX") && e->Attribute("startY")){
double startX = xmltof(e->Attribute("startX"),NAN);
double startY = xmltof(e->Attribute("startY"),NAN);
......@@ -298,7 +299,7 @@ void PedDistributor::InitDistributor(const string& filename){
}
Log->Write("INFO: \t...Done");
Log->Write("INFO: \t...Done");
}
int PedDistributor::Distribute(Building* building) const {
......
......@@ -75,9 +75,7 @@ void GlobalRouter::Init(Building* building) {
Log->Write("INFO:\tInit the Global Router Engine");
_building = building;
LoadRoutingInfos(GetRoutingInfoFile());
//check the loaded routing informations (crossings, hlines,...)
// for inconsistencies
//TODO: enable me when the navigation lines IDs are fixed
......@@ -989,8 +987,10 @@ string GlobalRouter::GetRoutingInfoFile() const {
nav_line_file=e->FirstChild("parameters")->FirstChildElement("navigation_lines")->Attribute("file");
}
}
return _building->GetProjectRootDir()+nav_line_file;
if (nav_line_file == "")
return nav_line_file;
else
return _building->GetProjectRootDir()+nav_line_file;
}
......
make
#./rebuild.exe -n ./Inputfiles/start.dat --geometry ./Inputfiles/Raum60.jul --exitstrategy 1 --dt 0.001 --linkedcells --routing 2
#./rebuild.exe --inifile --exitstrategy 3 --routing 3 --travisto 1 --linkedcells --log 2 --fps 8
#./rebuild.exe --inifile=./samples/ini-arena.xml
#./rebuild.exe --inifile=ini-unc.xml -e 3
#./rebuild.exe --inifile=ini-Headon.xml
#!/bin/bash
COMPILE=0 # 1 -> compile first
if [ $COMPILE -eq 1 ];then
make
fi
#./rebuild.exe --inifile=ini.xml
./rebuild.exe --inifile="inputfiles/arena/131021_arena_ini.xml"
#./rebuild.exe --inifile=ini-Bottleneck.xml -e 3 --fps=16
#./rebuild.exe --inifile=./demos/ini-Perpen.xml
#./rebuild.exe --inifile=ini-GSP.xml
#./rebuild.exe --inifile=./demos/ini-T.xml --fps=8
./rebuild.exe --inifile=inputfiles/Bottleneck/ini_bottleneck.xml
#./rebuild.exe --inifile="inputfiles/arena/131021_arena_ini.xml"
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