Commit 4db6e325 authored by tobias schroedter's avatar tobias schroedter

Added WaitingAreas, which can be parsed.

parent d14229f7
......@@ -312,7 +312,7 @@ geometry/Room.cpp
geometry/Wall.cpp
geometry/Goal.cpp
IO/GeoFileParser.cpp
IO/GeoFileParser.cpp
IO/IniFileParser.cpp
IO/IODispatcher.cpp
IO/OutputHandler.cpp
......@@ -409,7 +409,7 @@ JPSfire/B_walking_speed/WalkingSpeed.cpp
JPSfire/C_toxicity_analysis/ToxicityAnalysis.cpp
JPSfire/C_toxicity_analysis/ToxicityOutputhandler.cpp
forms/jpscore.rc
math/KrauszModel.cpp)
math/KrauszModel.cpp geometry/WaitingArea.cpp geometry/WaitingArea.h)
set(header_files
......@@ -501,8 +501,7 @@ geometry/Hline.h
geometry/Obstacle.h
geometry/SubRoom.h
geometry/Goal.h
IO/GeoFileParser.h
IO/GeoFileParser.h
IO/IniFileParser.h
IO/IODispatcher.h
IO/OutputHandler.h
......
......@@ -22,6 +22,7 @@
#include "GeoFileParser.h"
#include "../tinyxml/tinyxml.h"
#include "../geometry/SubRoom.h"
#include "../geometry/WaitingArea.h"
GeoFileParser::GeoFileParser(Configuration* configuration)
:_configuration(configuration)
......@@ -363,7 +364,7 @@ bool GeoFileParser::LoadRoutingInfo(Building* building)
//load goals and routes
TiXmlNode* xGoalsNode = xRootNode->FirstChild("routing")->FirstChild("goals");
if (xGoalsNode)
if (xGoalsNode) {
for (TiXmlElement* e = xGoalsNode->FirstChildElement("goal"); e;
e = e->NextSiblingElement("goal")) {
......@@ -400,6 +401,71 @@ bool GeoFileParser::LoadRoutingInfo(Building* building)
_configuration->GetRoutingEngine()->AddFinalDestinationID(goal->GetId());
}
for (TiXmlElement* e = xGoalsNode->FirstChildElement("waiting_area"); e;
e = e->NextSiblingElement("waiting_area")) {
// Read valus from ini File
int id = xmltoi(e->Attribute("id"), -1);
int open = std::string(e->Attribute("is_open"))=="true" ? true : false;
int min_peds = xmltoi(e->Attribute("min_peds"), -1);
int max_peds = xmltoi(e->Attribute("max_peds"), -1);
int waiting_time = xmltoi(e->Attribute("waiting_time"), -1);
std::string caption = xmltoa(e->Attribute("caption"), "-1");
Goal* wa = new WaitingArea();
WaitingArea* waitingArea = static_cast<WaitingArea*>(wa);
waitingArea->SetId(id);
waitingArea->SetCaption(caption);
waitingArea->setOpen(open);
waitingArea->setMinNumPed(min_peds);
waitingArea->setMaxNumPed(max_peds);
waitingArea->setWaitingTime(waiting_time);
std::map<int, double> nextGoals;
//looking for next_wa
for (TiXmlElement* nextWa = e->FirstChildElement("next_wa"); nextWa;
nextWa = nextWa->NextSiblingElement("next_wa")) {
int nextWaId = xmltoi(nextWa->Attribute("id"));
double nextWaP = xmltof(nextWa->Attribute("p"));
std::cout << "nextWaID=" << nextWaId << ", nextWaP=" << nextWaP << std::endl;
nextGoals.insert(std::pair<int, double>(nextWaId, nextWaP));
}
if (!waitingArea->setNextGoals(nextGoals)){
return false;
};
//looking for polygons (walls)
for (TiXmlElement* xPolyVertices = e->FirstChildElement("polygon"); xPolyVertices;
xPolyVertices = xPolyVertices->NextSiblingElement("polygon")) {
for (TiXmlElement* xVertex = xPolyVertices->FirstChildElement(
"vertex");
xVertex && xVertex!=xPolyVertices->LastChild("vertex");
xVertex = xVertex->NextSiblingElement("vertex")) {
double x1 = xmltof(xVertex->Attribute("px"));
double y1 = xmltof(xVertex->Attribute("py"));
double x2 = xmltof(xVertex->NextSiblingElement("vertex")->Attribute("px"));
double y2 = xmltof(xVertex->NextSiblingElement("vertex")->Attribute("py"));
wa->AddWall(Wall(Point(x1, y1), Point(x2, y2)));
}
}
if (!wa->ConvertLineToPoly()){
return false;
}
building->AddGoal(wa);
_configuration->GetRoutingEngine()->AddFinalDestinationID(wa->GetId());
std::cout << waitingArea->toString() << std::endl;
}
}
//load routes
TiXmlNode* xTripsNode = xRootNode->FirstChild("routing")->FirstChild("routes");
......
#MCC = g++ -std=c++11
MCC = pgc++ --c++11 -Minform=inform -mp
#CFLAGS= --c++11 -Wall -ansi
SOURCES=main.cpp Simulation.cpp general/ArgumentParser.cpp tinyxml/tinystr.cpp \
tinyxml/tinyxml.cpp tinyxml/tinyxmlerror.cpp tinyxml/tinyxmlparser.cpp \
geometry/Building.cpp geometry/Line.cpp geometry/Point.cpp \
geometry/Transition.cpp geometry/Hline.cpp geometry/Obstacle.cpp \
geometry/SubRoom.cpp geometry/Crossing.cpp geometry/NavLine.cpp \
geometry/Room.cpp geometry/Wall.cpp geometry/Goal.cpp \
IO/IODispatcher.cpp IO/OutputHandler.cpp IO/TraVisToClient.cpp \
math/ForceModel.cpp math/Mathematics.cpp math/ODESolver.cpp \
math/GCFMModel.cpp math/Distribution.cpp math/GompertzModel.cpp mpi/LCGrid.cpp \
pedestrian/Ellipse.cpp pedestrian/PedDistributor.cpp pedestrian/Pedestrian.cpp \
routing/AccessPoint.cpp routing/DirectionStrategy.cpp \
routing/DummyRouter.cpp routing/GlobalRouter.cpp routing/GraphRouter.cpp \
routing/QuickestPathRouter.cpp routing/SafestPathRouter.cpp routing/Router.cpp \
routing/RoutingEngine.cpp routing/NavMesh.cpp routing/DTriangulation.cpp \
routing/MeshRouter.cpp routing/mesh/Mesh.cpp routing/graph/NavLineState.cpp \
routing/graph/RoutingGraph.cpp routing/graph/RoutingGraphStorage.cpp \
routing/CognitiveMapRouter.cpp routing/cognitive_map/CognitiveMap.cpp \
routing/cognitive_map/NavigationGraph.cpp routing/cognitive_map/CognitiveMapStorage.cpp \
routing/cognitive_map/AbstractCognitiveMapCreator.cpp routing/cognitive_map/CompleteCognitiveMapCreator.cpp \
routing/cognitive_map/EmptyCognitiveMapCreator.cpp routing/cognitive_map/navigation_graph/GraphEdge.cpp \
routing/cognitive_map/navigation_graph/GraphVertex.cpp routing/cognitive_map/sensor/RoomToFloorSensor.cpp \
routing/cognitive_map/sensor/SensorManager.cpp routing/cognitive_map/sensor/AbstractSensor.cpp \
poly2tri/common/shapes.cpp poly2tri/sweep/sweep_context.cpp poly2tri/sweep/advancing_front.cpp \
poly2tri/sweep/sweep.cpp poly2tri/sweep/cdt.cpp events/EventManager.cpp \
math/GPU_GCFMModel.cpp \
#OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=jpscore_pgi.exe
all:
$(MCC) $(LDFLAGS) $(LREALEASE) -o $(EXECUTABLE) $(SOURCES)
clean :
rm -f $(EXECUTABLE)
rm -f $(OBJECTS)
rm -f *.o
# Copyright (c) 2012 - 2015, Lars Bilke
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
#
# 2012-01-31, Lars Bilke
# - Enable Code Coverage
#
# 2013-09-17, Joakim Söderberg
# - Added support for Clang.
# - Some additional usage instructions.
#
# USAGE:
# 0. (Mac only) If you use Xcode 5.1 make sure to patch geninfo as described here:
# http://stackoverflow.com/a/22404544/80480
#
# 1. Copy this file into your cmake modules path.
#
# 2. Add the following line to your CMakeLists.txt:
# INCLUDE(CodeCoverage)
#
# 3. Set compiler flags to turn off optimization and enable coverage:
# SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
# SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
#
# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
# which runs your test executable and produces a lcov code coverage report:
# Example:
# SETUP_TARGET_FOR_COVERAGE(
# my_coverage_target # Name for custom target.
# test_driver # Name of the test driver executable that runs the tests.
# # NOTE! This should always have a ZERO as exit code
# # otherwise the coverage generation will not complete.
# coverage # Name of output directory.
# )
#
# 4. Build a Debug build:
# cmake -DCMAKE_BUILD_TYPE=Debug ..
# make
# make my_coverage_target
#
#
# Check prereqs
FIND_PROGRAM( GCOV_PATH gcov )
FIND_PROGRAM( LCOV_PATH lcov )
FIND_PROGRAM( GENHTML_PATH genhtml )
FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
IF(NOT GCOV_PATH)
MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
ENDIF() # NOT GCOV_PATH
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
# Clang version 3.0.0 and greater now supports gcov as well.
MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
ENDIF()
ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX
SET(CMAKE_CXX_FLAGS_COVERAGE
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE )
SET(CMAKE_C_FLAGS_COVERAGE
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
CACHE STRING "Flags used by the C compiler during coverage builds."
FORCE )
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used for linking binaries during coverage builds."
FORCE )
SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
FORCE )
MARK_AS_ADVANCED(
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage"))
MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
# Param _targetname The name of new the custom make target
# Param _testrunner The name of the target which runs the tests.
# MUST return ZERO always, even on errors.
# If not, no coverage report will be created!
# Param _outputname lcov output is generated as _outputname.info
# HTML report is generated in _outputname/index.html
# Optional fourth parameter is passed as arguments to _testrunner
# Pass them in list form, e.g.: "-j;2" for -j 2
FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
IF(NOT LCOV_PATH)
MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
ENDIF() # NOT LCOV_PATH
IF(NOT GENHTML_PATH)
MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
ENDIF() # NOT GENHTML_PATH
# Setup target
ADD_CUSTOM_TARGET(${_targetname}
# Cleanup lcov
${LCOV_PATH} --directory . --zerocounters
# Run tests
COMMAND ${_testrunner} -R Boost ${ARGV3}
# Capturing lcov counters and generating report
COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
)
# Show info where to find the report
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
COMMAND ;
COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
)
ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
# Param _targetname The name of new the custom make target
# Param _testrunner The name of the target which runs the tests
# Param _outputname cobertura output is generated as _outputname.xml
# Optional fourth parameter is passed as arguments to _testrunner
# Pass them in list form, e.g.: "-j;2" for -j 2
FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
IF(NOT PYTHON_EXECUTABLE)
MESSAGE(FATAL_ERROR "Python 3 not found! Aborting...")
ENDIF() # NOT PYTHON_EXECUTABLE
IF(NOT GCOVR_PATH)
MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
ENDIF() # NOT GCOVR_PATH
ADD_CUSTOM_TARGET(${_targetname}
# Run tests
MESSAGE(WARNING "running: " ${_testrunner} -R Boost ${ARGV3})
${_testrunner} -R Boost ${ARGV3}
# Running gcovr
COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Running gcovr to produce Cobertura code coverage report."
)
# Show info where to find the report
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
COMMAND ;
COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
)
ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
find_package(PkgConfig)
pkg_check_modules(PC_GRPC grpc++)
set(GRPC_DEFINITIONS ${PC_GRPC_CFLAGS_OTHER})
find_path(GRPC_INCLUDE_DIR grpc++/grpc++.h
HINTS ${PC_GRPC_INCLUDEDIR} ${PC_GRPC_INCLUDE_DIRS}
PATHS_SUFIXES grpc++)
find_library(GRPC_LIBRARY NAMES grpc++ libgrpc++
HINTS ${PC_GRPC_LIBDIR} ${PC_GRPC_LIBRARY_DIRS})
set(GRPC_LIBRARIES ${GRPC_LIBRARY})
set(GRPC_INCLUD_DIRS ${GRPC_INCLUDE_DIR})
message(STATUS ${GRPC_LIBRARY})
message(STATUS ${GRPC_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GRPC DEFAULT_MSG
GRPC_LIBRARY GRPC_INCLUDE_DIR)
mark_as_advanced(GRPC_INCLUDE_DIR GRPC_LIBRARY)
find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin) # Get full path to plugin
function(PROTOBUF_GENERATE_GRPC_CPP SRCS HDRS)
if(NOT ARGN)
message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
return()
endif()
if(PROTOBUF_GENERATE_CPP_APPEND_PATH) # This variable is common for all types of output.
# Create an include path for each file specified
foreach(FIL ${ARGN})
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
get_filename_component(ABS_PATH ${ABS_FIL} PATH)
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
if(${_contains_already} EQUAL -1)
list(APPEND _protobuf_include_path -I ${ABS_PATH})
endif()
endforeach()
else()
set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
endif()
if(DEFINED PROTOBUF_IMPORT_DIRS)
foreach(DIR ${PROTOBUF_IMPORT_DIRS})
get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
if(${_contains_already} EQUAL -1)
list(APPEND _protobuf_include_path -I ${ABS_PATH})
endif()
endforeach()
endif()
set(${SRCS})
set(${HDRS})
foreach(FIL ${ARGN})
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
get_filename_component(FIL_WE ${FIL} NAME_WE)
list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.cc")
list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.h")
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.cc"
"${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.h"
COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
ARGS --grpc_out=${CMAKE_CURRENT_BINARY_DIR}
--plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN}
${_protobuf_include_path} ${ABS_FIL}
DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE}
COMMENT "Running gRPC C++ protocol buffer compiler on ${FIL}"
VERBATIM)
endforeach()
set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
set(${SRCS} ${${SRCS}} PARENT_SCOPE)
set(${HDRS} ${${HDRS}} PARENT_SCOPE)
endfunction()
......@@ -32,15 +32,16 @@
#include <string>
#include <vector>
#include "Point.h"
//forward declarations
class Wall;
class Point;
//class Point;
class Goal {
private:
protected:
int _isFinalGoal;
int _id;
Point _centroid;
......
//
// Created by Tobias Schrödter on 15.10.18.
//
#include "WaitingArea.h"
int WaitingArea::getMaxNumPed() const
{
return maxNumPed;
}
void WaitingArea::setMaxNumPed(int maxNumPed)
{
WaitingArea::maxNumPed = maxNumPed;
}
int WaitingArea::getMinNumPed() const
{
return minNumPed;
}
void WaitingArea::setMinNumPed(int minNumPed)
{
WaitingArea::minNumPed = minNumPed;
}
bool WaitingArea::isOpen() const
{
return open;
}
void WaitingArea::setOpen(bool open)
{
WaitingArea::open = open;
}
const std::map<int, double>& WaitingArea::getNextGoals() const
{
return nextGoals;
}
bool WaitingArea::setNextGoals(const std::map<int, double>& nextGoals)
{
WaitingArea::nextGoals = nextGoals;
return checkProbabilities();
}
bool WaitingArea::checkProbabilities()
{
double p =0.;
for ( std::map<int, double>::iterator it = nextGoals.begin(); it != nextGoals.end(); it++ ){
p += it->second;
}
return (p>0.9999) && (p<1.000001);
}
void WaitingArea::updateProbabilities()
{
}
std::string WaitingArea::toString()
{
std::string out;
char buffer [50];
out.append("WaitingArea[\n");
sprintf(buffer, "\tid=%d\n", _id);
out.append(buffer);
sprintf(buffer, "\tcaption=%s\n", _caption.c_str());
out.append(buffer);
sprintf(buffer, "\tmin_peds=%d\n", minNumPed);
out.append(buffer);
sprintf(buffer, "\tmax_peds=%d\n", maxNumPed);
out.append(buffer);
sprintf(buffer, "\tis_open=%d\n", open);
out.append(buffer);
sprintf(buffer, "\twaiting_time=%d\n", waitingTime);
out.append(buffer);
for (auto const& nextWa : nextGoals){
sprintf(buffer, "\tnext id=%d\tp=%f\n", nextWa.first, nextWa.second);
out.append(buffer);
}
out.append("]");
return out;
}
double WaitingArea::getWaitingTime() const
{
return waitingTime;
}
void WaitingArea::setWaitingTime(double waitingTime)
{
WaitingArea::waitingTime = waitingTime;
}
//
// Created by Tobias Schrödter on 15.10.18.
//
#ifndef _WAITINGAREA_H
#define _WAITINGAREA_H
#include "Goal.h"
#include <vector>
#include <map>
#include <stdio.h>
class WaitingArea : public Goal{
protected:
/**
* Number of Pedestrians who can be in the waiting area at the same time
*/
int maxNumPed = -1;
/**
* Number of Pedestrians who can be in the waiting area at the same time
*/
int minNumPed = -1;
double waitingTime = -1;
protected:
/**
* Defines whether pedestrians can enter the waiting area
*/
bool open;
/**
* Map of possible next goals/waiting areas (id) with corresponding probability
*/
std::map<int, double> nextGoals;
public:
int getMaxNumPed() const;
void setMaxNumPed(int maxNumPed);
int getMinNumPed() const;
void setMinNumPed(int minNumPed);
bool isOpen() const;
void setOpen(bool open);
const std::map<int, double>& getNextGoals() const;
bool setNextGoals(const std::map<int, double>& nextGoals);
std::string toString();
double getWaitingTime() const;
void setWaitingTime(double waitingTime);
private:
void updateProbabilities();
bool checkProbabilities();
};
//std::ostream& operator<<(std::ostream &strm, const WaitingArea &wa) {
// std::string out;
// char buffer [50];
//
//
// out.append("WaitingArea[\n");
// sprintf(buffer, "\tid=%d\n", wa.getId());
// out.append(buffer);
// out.append("]");
// return strm << out;
//}
#endif //_WAITINGAREA_H
......@@ -155,6 +155,48 @@
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="waiting_area" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="polygon">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="1">
<xs:element name="vertex">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:float" name="px" use="required" />
<xs:attribute type="xs:float" name="py" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="next_wa">
<xs:complexType>
<xs:attribute type="xs:int" name="id" use="required" />
<xs:attribute type="xs:int" name="p" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:int" name="id" use="required" />
<xs:attribute type="xs:string" name="caption" use="required" />
<xs:attribute type="xs:int" name="waiting_time" use="required" />
<xs:attribute type="xs:int" name="min_peds" use="optional" />
<xs:attribute type="xs:int" name="max_peds" use="optional" />
<xs:attribute name="is_open" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="true" />
<xs:enumeration value="false" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
......
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