Commit a70c13ac authored by Ulrich Kemloh's avatar Ulrich Kemloh

move the xsd definitions to a separate folder

parent 1db473cc
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<geometry version="0.5" caption="second life" unit="m">
<geometry version="0.5" caption="second life" unit="m"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../xsd/jps_geometry.xsd">
<rooms>
<room id="0" caption="hall">
<subroom id="0" closed="0" class="subroom">
......@@ -15,7 +17,7 @@
</rooms>
<transitions>
<!-- exits like crossings but between rooms or to outside (room with index
<!-- exits like crossings but between rooms or to outside (room with index
= -1) -->
<transition id="0" caption="main exit" type="emergency"
room1_id="0" subroom1_id="0" room2_id="-1" subroom2_id="-1">
......
<?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">
<JuPedSim project="JPS-Project" version="0.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<!-- seed used for initialising random generator -->
<seed>12542</seed>
<max_sim_time>200</max_sim_time>
<!-- geometry file -->
<geometry>corridor_geo.xml</geometry>
<!-- trajectories file and format -->
<trajectories format="xml-plain" fps="8">
<file location="corridor_traj.xml" />
<!--<socket hostname="127.0.0.1" port="8989"/> -->
</trajectories>
<!-- where to store the logs -->
<!--<logfile>log.txt</logfile> -->
<!-- seed used for initialising random generator -->
<seed>12542</seed>
<max_sim_time>200</max_sim_time>
<!-- geometry file -->
<geometry>corridor_geo.xml</geometry>
<!-- trajectories file and format -->
<trajectories format="xml-plain" fps="8">
<file location="corridor_traj.xml" />
<!--<socket hostname="127.0.0.1" port="8989"/> -->
</trajectories>
<!-- where to store the logs -->
<!--<logfile>log.txt</logfile> -->
<!-- traffic information: e.g closed doors or smoked rooms -->
<traffic_constraints>
<!-- room states are: good or smoked -->
</traffic_constraints>
<!-- traffic information: e.g closed doors or smoked rooms -->
<traffic_constraints>
<!-- room states are: good or smoked -->
</traffic_constraints>
<routing>
<routing>
</routing>
</routing>
<!--persons information and distribution -->
<agents operational_model_id="1">
<agents_distribution>
<group group_id="0" room_id="0" subroom_id="0" number="20" goal_id="" router_id="1" age="" gender="" height="" startX="" startY="" />
</agents_distribution>
<!--persons information and distribution -->
<agents operational_model_id="1">
<agents_distribution>
<group group_id="0" agent_parameter_id="1" room_id="0" subroom_id="0" number="20" goal_id="-1" router_id="1" />
</agents_distribution>
</agents>
</agents>
<!-- These parameters may be overwritten -->
<operational_models>
<model operational_model_id="1" description="gcfm">
<parameters>
<solver>euler</solver>
<stepsize>0.01</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>
<!-- These parameters may be overwritten -->
<operational_models>
<model operational_model_id="1" description="gcfm">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exitCrossingStrategy>4</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>
<agent_parameters agent_parameter_id="1">
<v0 mu="0.5" sigma="0.0" />
<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="2">
<v0 mu="0.5" sigma="0.0" />
<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>
</operational_models>
<route_choice_models>
<router router_id="1" description="global_shortest">
<parameters>
</parameters>
</router>
<route_choice_models>
<router router_id="1" description="global_shortest">
<parameters>
</parameters>
</router>
</route_choice_models>
</route_choice_models>
</JuPedSim>
<?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">
<JuPedSim project="JPS-Project" version="0.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://medilabo.de/jps_ini_core.xsd">
<!-- seed used for initialising random generator -->
<seed>12542</seed>
......@@ -20,7 +22,7 @@
<door trans_id="2" caption="" state="open" />
</doors>
</traffic_constraints>
<routing>
<goals>
<goal id="0" final="true" caption="goal 1">
......
......@@ -359,7 +359,7 @@ void Building::LoadBuildingFromFile()
exit(EXIT_FAILURE);
}
double version = xmltof(xRootNode->Attribute("version"), -1);
if (version != 0.5) { // @todo version number is hard coded
Log->Write(" \tWrong goemetry version!");
Log->Write(" \tOnly version >= %s supported",JPS_VERSION);
......@@ -535,7 +535,7 @@ void Building::LoadBuildingFromFile()
int id = xmltoi(xTrans->Attribute("id"), -1);
// string caption = "door " + id;
string caption = "door ";
caption += to_string(id);
caption += std::to_string(id);
caption = xmltoa(xTrans->Attribute("caption"), caption.c_str());
int room1_id = xmltoi(xTrans->Attribute("room1_id"), -1);
int room2_id = xmltoi(xTrans->Attribute("room2_id"), -1);
......@@ -1059,7 +1059,7 @@ void Building::Update()
unsigned int nSize = _allPedestians.size();
int nThreads = omp_get_max_threads();
int partSize = nSize / nThreads;
#pragma omp parallel default(shared) num_threads(nThreads)
......
<?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">
<JuPedSim project="JPS-Project" version="0.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<!-- seed used for initialising random generator -->
<seed>12542</seed>
......
<?xml version="1.0" encoding="UTF-8"?>
<routing version="0.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.medilabo.de/routing.xsd" >
xsi:noNamespaceSchemaLocation="http://www.medilabo.de/jps_routing.xsd" >
<Hlines>
<Hline id="7" room_id="0" subroom_id="1">
<vertex px="6.52" py="133.98" />
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<geometry version="0.5" caption="Projectname" unit="m"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://medilabo.de/geometry.xsd">
xsi:noNamespaceSchemaLocation="http://medilabo.de/jps_geometry.xsd">
<rooms>
<room id="0" caption="subway">
<subroom id="0" closed="0" class="subroom" A_x="0" B_y="0" C_z="0">
......
......@@ -3,12 +3,12 @@
<xs:element name="JuPedSim">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:int" name="seed">
<xs:element type="xs:int" name="seed" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>seed used for initialising random generator</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element type="xs:int" name="numCPU">
<xs:element type="xs:int" name="num_cpus" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>maximal simulation time</xs:documentation>
</xs:annotation>
......@@ -64,7 +64,8 @@
<xs:element name="traffic_constraints" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>traffic information: e.g closed doors or smoked
rooms</xs:documentation>
rooms
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
......@@ -366,7 +367,14 @@
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="project" />
<xs:attribute type="xs:float" name="version" />
<xs:attribute name="version" use="required">
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:enumeration value="0.5" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
</xs:schema>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="routing">
<xs:complexType>
......@@ -13,23 +13,30 @@
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="px" type="xs:float" use="required"/>
<xs:attribute name="py" type="xs:float" use="required"/>
<xs:attribute name="px" type="xs:float" use="required" />
<xs:attribute name="py" type="xs:float" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:int" use="required"/>
<xs:attribute name="room_id" type="xs:int" use="required"/>
<xs:attribute name="subroom_id" type="xs:int" use="required"/>
<xs:attribute name="id" type="xs:int" use="required" />
<xs:attribute name="room_id" type="xs:int" use="required" />
<xs:attribute name="subroom_id" type="xs:int" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:float" use="required"/>
<xs:attribute name="version" use="required">
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:enumeration value="0.5" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
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